From e3c1870133a6012edc631da17bf219e5d87c6714 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 13 Feb 2023 11:06:47 +0000 Subject: [PATCH] CodeGen from PR 22577 in Azure/azure-rest-api-specs Merge f9e7991fc5aab27feab90ab991cdd618c46fd818 into f1180941e238bc99ac71f9535ecd126bb8b77d8f --- .../azure-mgmt-containerservice/_meta.json | 6 +- .../_container_service_client.py | 67 +- .../mgmt/containerservice/_serialization.py | 89 +- .../aio/_container_service_client.py | 67 +- .../azure/mgmt/containerservice/models.py | 2 +- .../v2017_07_01/_container_service_client.py | 2 +- .../v2017_07_01/_metadata.json | 24 +- .../containerservice/v2017_07_01/_vendor.py | 5 +- .../containerservice/v2017_07_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../_container_services_operations.py | 2 +- .../v2017_07_01/models/_models_py3.py | 55 +- .../_container_services_operations.py | 2 +- .../v2018_03_31/_container_service_client.py | 2 +- .../v2018_03_31/_metadata.json | 24 +- .../containerservice/v2018_03_31/_vendor.py | 5 +- .../containerservice/v2018_03_31/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2018_03_31/models/_models_py3.py | 74 +- .../_managed_clusters_operations.py | 8 +- .../_container_service_client.py | 2 +- .../v2018_08_01_preview/_metadata.json | 24 +- .../v2018_08_01_preview/_vendor.py | 5 +- .../v2018_08_01_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2018_08_01_preview/models/_models_py3.py | 78 +- .../_managed_clusters_operations.py | 8 +- .../_container_service_client.py | 2 +- .../v2018_09_30_preview/_metadata.json | 24 +- .../v2018_09_30_preview/_vendor.py | 5 +- .../v2018_09_30_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2018_09_30_preview/models/_models_py3.py | 49 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2019_02_01/_container_service_client.py | 2 +- .../v2019_02_01/_metadata.json | 24 +- .../containerservice/v2019_02_01/_vendor.py | 5 +- .../containerservice/v2019_02_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_02_01/models/_models_py3.py | 90 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_04_01/_container_service_client.py | 2 +- .../v2019_04_01/_metadata.json | 24 +- .../containerservice/v2019_04_01/_vendor.py | 5 +- .../containerservice/v2019_04_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_04_01/models/_models_py3.py | 94 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_04_30/_container_service_client.py | 2 +- .../v2019_04_30/_metadata.json | 24 +- .../containerservice/v2019_04_30/_vendor.py | 5 +- .../containerservice/v2019_04_30/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2019_04_30/models/_models_py3.py | 51 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2019_06_01/_container_service_client.py | 2 +- .../v2019_06_01/_metadata.json | 24 +- .../containerservice/v2019_06_01/_vendor.py | 5 +- .../containerservice/v2019_06_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_06_01/models/_models_py3.py | 110 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_08_01/_container_service_client.py | 2 +- .../v2019_08_01/_metadata.json | 24 +- .../containerservice/v2019_08_01/_vendor.py | 5 +- .../containerservice/v2019_08_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_08_01/models/_models_py3.py | 128 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../_container_service_client.py | 2 +- .../v2019_09_30_preview/_metadata.json | 24 +- .../v2019_09_30_preview/_vendor.py | 5 +- .../v2019_09_30_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2019_09_30_preview/models/_models_py3.py | 55 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2019_10_01/_container_service_client.py | 2 +- .../v2019_10_01/_metadata.json | 24 +- .../containerservice/v2019_10_01/_vendor.py | 5 +- .../containerservice/v2019_10_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_10_01/models/_models_py3.py | 128 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../_container_service_client.py | 2 +- .../v2019_10_27_preview/_metadata.json | 24 +- .../v2019_10_27_preview/_vendor.py | 5 +- .../v2019_10_27_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2019_10_27_preview/models/_models_py3.py | 57 +- ..._open_shift_managed_clusters_operations.py | 4 +- .../v2019_11_01/_container_service_client.py | 2 +- .../v2019_11_01/_metadata.json | 24 +- .../containerservice/v2019_11_01/_vendor.py | 5 +- .../containerservice/v2019_11_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2019_11_01/models/_models_py3.py | 140 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_01_01/_container_service_client.py | 2 +- .../v2020_01_01/_metadata.json | 24 +- .../containerservice/v2020_01_01/_vendor.py | 5 +- .../containerservice/v2020_01_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_01_01/models/_models_py3.py | 140 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_02_01/_container_service_client.py | 2 +- .../v2020_02_01/_metadata.json | 24 +- .../containerservice/v2020_02_01/_vendor.py | 5 +- .../containerservice/v2020_02_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_02_01/models/_models_py3.py | 144 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_03_01/_container_service_client.py | 2 +- .../v2020_03_01/_metadata.json | 24 +- .../containerservice/v2020_03_01/_vendor.py | 5 +- .../containerservice/v2020_03_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_03_01/models/_models_py3.py | 152 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_04_01/_container_service_client.py | 2 +- .../v2020_04_01/_metadata.json | 24 +- .../containerservice/v2020_04_01/_vendor.py | 5 +- .../containerservice/v2020_04_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_04_01/models/_models_py3.py | 154 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- .../v2020_06_01/_container_service_client.py | 2 +- .../v2020_06_01/_metadata.json | 24 +- .../containerservice/v2020_06_01/_vendor.py | 5 +- .../containerservice/v2020_06_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- .../v2020_06_01/models/_models_py3.py | 170 +- .../operations/_agent_pools_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- .../v2020_07_01/_container_service_client.py | 2 +- .../v2020_07_01/_metadata.json | 24 +- .../containerservice/v2020_07_01/_vendor.py | 5 +- .../containerservice/v2020_07_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- .../v2020_07_01/models/_models_py3.py | 172 +- .../operations/_agent_pools_operations.py | 4 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- .../v2020_09_01/_container_service_client.py | 2 +- .../v2020_09_01/_metadata.json | 24 +- .../containerservice/v2020_09_01/_vendor.py | 5 +- .../containerservice/v2020_09_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2020_09_01/models/_models_py3.py | 180 +- .../operations/_agent_pools_operations.py | 4 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2020_11_01/_container_service_client.py | 2 +- .../v2020_11_01/_metadata.json | 24 +- .../containerservice/v2020_11_01/_vendor.py | 5 +- .../containerservice/v2020_11_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2020_11_01/models/_models_py3.py | 208 +- .../operations/_agent_pools_operations.py | 4 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2020_12_01/_container_service_client.py | 2 +- .../v2020_12_01/_metadata.json | 24 +- .../containerservice/v2020_12_01/_vendor.py | 5 +- .../containerservice/v2020_12_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2020_12_01/models/_models_py3.py | 230 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2021_02_01/_container_service_client.py | 2 +- .../v2021_02_01/_metadata.json | 24 +- .../containerservice/v2021_02_01/_vendor.py | 5 +- .../containerservice/v2021_02_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2021_02_01/models/_models_py3.py | 230 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 2 +- .../_managed_clusters_operations.py | 8 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2021_03_01/_container_service_client.py | 2 +- .../v2021_03_01/_metadata.json | 24 +- .../containerservice/v2021_03_01/_vendor.py | 5 +- .../containerservice/v2021_03_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 2 +- .../_managed_clusters_operations.py | 12 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2021_03_01/models/_models_py3.py | 250 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 2 +- .../_managed_clusters_operations.py | 12 +- ...private_endpoint_connections_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2021_05_01/_container_service_client.py | 2 +- .../v2021_05_01/_metadata.json | 24 +- .../containerservice/v2021_05_01/_vendor.py | 5 +- .../containerservice/v2021_05_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../models/_container_service_client_enums.py | 168 +- .../v2021_05_01/models/_models_py3.py | 288 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2021_07_01/_container_service_client.py | 2 +- .../v2021_07_01/_metadata.json | 24 +- .../containerservice/v2021_07_01/_vendor.py | 5 +- .../containerservice/v2021_07_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../models/_container_service_client_enums.py | 180 +- .../v2021_07_01/models/_models_py3.py | 298 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../v2021_08_01/_container_service_client.py | 2 +- .../v2021_08_01/_metadata.json | 24 +- .../containerservice/v2021_08_01/_vendor.py | 5 +- .../containerservice/v2021_08_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 186 +- .../v2021_08_01/models/_models_py3.py | 306 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../v2021_09_01/_container_service_client.py | 2 +- .../v2021_09_01/_metadata.json | 24 +- .../containerservice/v2021_09_01/_vendor.py | 5 +- .../containerservice/v2021_09_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 186 +- .../v2021_09_01/models/_models_py3.py | 310 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../v2021_10_01/_container_service_client.py | 2 +- .../v2021_10_01/_metadata.json | 24 +- .../containerservice/v2021_10_01/_vendor.py | 5 +- .../containerservice/v2021_10_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 186 +- .../v2021_10_01/models/_models_py3.py | 310 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2021_11_01_preview/_metadata.json | 24 +- .../v2021_11_01_preview/_vendor.py | 5 +- .../v2021_11_01_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 186 +- .../v2021_11_01_preview/models/_models_py3.py | 312 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../v2022_01_01/_container_service_client.py | 2 +- .../v2022_01_01/_metadata.json | 24 +- .../containerservice/v2022_01_01/_vendor.py | 5 +- .../containerservice/v2022_01_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 192 +- .../v2022_01_01/models/_models_py3.py | 310 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_01_02_preview/_metadata.json | 24 +- .../v2022_01_02_preview/_vendor.py | 5 +- .../v2022_01_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 196 +- .../v2022_01_02_preview/models/_models_py3.py | 312 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../v2022_02_01/_container_service_client.py | 2 +- .../v2022_02_01/_metadata.json | 24 +- .../containerservice/v2022_02_01/_vendor.py | 5 +- .../containerservice/v2022_02_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 192 +- .../v2022_02_01/models/_models_py3.py | 310 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_02_02_preview/_metadata.json | 24 +- .../v2022_02_02_preview/_vendor.py | 5 +- .../v2022_02_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 198 +- .../v2022_02_02_preview/models/_models_py3.py | 328 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../v2022_03_01/_container_service_client.py | 2 +- .../v2022_03_01/_metadata.json | 24 +- .../containerservice/v2022_03_01/_vendor.py | 5 +- .../containerservice/v2022_03_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 192 +- .../v2022_03_01/models/_models_py3.py | 325 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_03_02_preview/_metadata.json | 24 +- .../v2022_03_02_preview/_vendor.py | 5 +- .../v2022_03_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 198 +- .../v2022_03_02_preview/models/_models_py3.py | 353 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../v2022_04_01/_container_service_client.py | 2 +- .../v2022_04_01/_metadata.json | 24 +- .../containerservice/v2022_04_01/_vendor.py | 5 +- .../containerservice/v2022_04_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 192 +- .../v2022_04_01/models/_models_py3.py | 325 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_04_02_preview/_metadata.json | 24 +- .../v2022_04_02_preview/_vendor.py | 5 +- .../v2022_04_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 202 +- .../v2022_04_02_preview/models/_models_py3.py | 363 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../_container_service_client.py | 2 +- .../v2022_05_02_preview/_metadata.json | 24 +- .../v2022_05_02_preview/_vendor.py | 5 +- .../v2022_05_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 202 +- .../v2022_05_02_preview/models/_models_py3.py | 371 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../v2022_06_01/_container_service_client.py | 2 +- .../v2022_06_01/_metadata.json | 24 +- .../containerservice/v2022_06_01/_vendor.py | 5 +- .../containerservice/v2022_06_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 196 +- .../v2022_06_01/models/_models_py3.py | 327 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_06_02_preview/_metadata.json | 24 +- .../v2022_06_02_preview/_vendor.py | 5 +- .../v2022_06_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../operations/_fleet_members_operations.py | 4 +- .../aio/operations/_fleets_operations.py | 6 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 202 +- .../v2022_06_02_preview/models/_models_py3.py | 402 +- .../operations/_agent_pools_operations.py | 4 +- .../operations/_fleet_members_operations.py | 4 +- .../operations/_fleets_operations.py | 6 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../v2022_07_01/_container_service_client.py | 2 +- .../v2022_07_01/_metadata.json | 24 +- .../containerservice/v2022_07_01/_vendor.py | 5 +- .../containerservice/v2022_07_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 196 +- .../v2022_07_01/models/_models_py3.py | 327 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_07_02_preview/_metadata.json | 24 +- .../v2022_07_02_preview/_vendor.py | 5 +- .../v2022_07_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../operations/_fleet_members_operations.py | 4 +- .../aio/operations/_fleets_operations.py | 6 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 226 +- .../v2022_07_02_preview/models/_models_py3.py | 423 +- .../operations/_agent_pools_operations.py | 4 +- .../operations/_fleet_members_operations.py | 4 +- .../operations/_fleets_operations.py | 6 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../_container_service_client.py | 2 +- .../v2022_08_02_preview/_metadata.json | 24 +- .../v2022_08_02_preview/_vendor.py | 5 +- .../v2022_08_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 242 +- .../v2022_08_02_preview/models/_models_py3.py | 414 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../_container_service_client.py | 2 +- .../v2022_08_03_preview/_metadata.json | 24 +- .../v2022_08_03_preview/_vendor.py | 5 +- .../v2022_08_03_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 242 +- .../v2022_08_03_preview/models/_models_py3.py | 418 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../v2022_09_01/_container_service_client.py | 2 +- .../v2022_09_01/_metadata.json | 24 +- .../containerservice/v2022_09_01/_vendor.py | 5 +- .../containerservice/v2022_09_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 196 +- .../v2022_09_01/models/_models_py3.py | 331 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_09_02_preview/_metadata.json | 24 +- .../v2022_09_02_preview/_vendor.py | 5 +- .../v2022_09_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../operations/_fleet_members_operations.py | 4 +- .../aio/operations/_fleets_operations.py | 6 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 248 +- .../v2022_09_02_preview/models/_models_py3.py | 457 +- .../operations/_agent_pools_operations.py | 4 +- .../operations/_fleet_members_operations.py | 4 +- .../operations/_fleets_operations.py | 6 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../_container_service_client.py | 2 +- .../v2022_10_02_preview/_metadata.json | 24 +- .../v2022_10_02_preview/_vendor.py | 5 +- .../v2022_10_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 280 +- .../v2022_10_02_preview/models/_models_py3.py | 454 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../v2022_11_01/_container_service_client.py | 2 +- .../v2022_11_01/_metadata.json | 24 +- .../containerservice/v2022_11_01/_vendor.py | 5 +- .../containerservice/v2022_11_01/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- .../models/_container_service_client_enums.py | 196 +- .../v2022_11_01/models/_models_py3.py | 337 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- .../_container_service_client.py | 2 +- .../v2022_11_02_preview/_metadata.json | 24 +- .../v2022_11_02_preview/_vendor.py | 5 +- .../v2022_11_02_preview/_version.py | 2 +- .../aio/_container_service_client.py | 2 +- .../aio/operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../aio/operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../models/_container_service_client_enums.py | 290 +- .../v2022_11_02_preview/models/_models_py3.py | 458 +- .../operations/_agent_pools_operations.py | 4 +- .../_maintenance_configurations_operations.py | 4 +- .../_managed_cluster_snapshots_operations.py | 6 +- .../_managed_clusters_operations.py | 15 +- ...private_endpoint_connections_operations.py | 4 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 6 +- ...trusted_access_role_bindings_operations.py | 4 +- .../containerservice/v2023_01_01/__init__.py | 26 + .../v2023_01_01/_configuration.py | 72 + .../v2023_01_01/_container_service_client.py | 136 + .../v2023_01_01/_metadata.json | 117 + .../containerservice/v2023_01_01/_patch.py | 20 + .../containerservice/v2023_01_01/_vendor.py | 30 + .../containerservice/v2023_01_01/_version.py | 9 + .../v2023_01_01/aio/__init__.py | 23 + .../v2023_01_01/aio/_configuration.py | 72 + .../aio/_container_service_client.py | 137 + .../v2023_01_01/aio/_patch.py | 20 + .../v2023_01_01/aio/operations/__init__.py | 33 + .../aio/operations/_agent_pools_operations.py | 1003 ++ .../_maintenance_configurations_operations.py | 448 + .../_managed_clusters_operations.py | 2772 ++++++ .../v2023_01_01/aio/operations/_operations.py | 139 + .../v2023_01_01/aio/operations/_patch.py | 20 + ...private_endpoint_connections_operations.py | 474 + .../_private_link_resources_operations.py | 122 + ...olve_private_link_service_id_operations.py | 203 + .../aio/operations/_snapshots_operations.py | 650 ++ .../v2023_01_01/models/__init__.py | 291 + .../models/_container_service_client_enums.py | 629 ++ .../v2023_01_01/models/_models_py3.py | 6288 +++++++++++++ .../v2023_01_01/models/_patch.py | 20 + .../v2023_01_01/operations/__init__.py | 33 + .../operations/_agent_pools_operations.py | 1328 +++ .../_maintenance_configurations_operations.py | 611 ++ .../_managed_clusters_operations.py | 3636 ++++++++ .../v2023_01_01/operations/_operations.py | 161 + .../v2023_01_01/operations/_patch.py | 20 + ...private_endpoint_connections_operations.py | 656 ++ .../_private_link_resources_operations.py | 165 + ...olve_private_link_service_id_operations.py | 249 + .../operations/_snapshots_operations.py | 861 ++ .../containerservice/v2023_01_01/py.typed | 1 + .../v2023_01_02_preview/__init__.py | 26 + .../v2023_01_02_preview/_configuration.py | 72 + .../_container_service_client.py | 159 + .../v2023_01_02_preview/_metadata.json | 120 + .../v2023_01_02_preview/_patch.py | 20 + .../v2023_01_02_preview/_vendor.py | 30 + .../v2023_01_02_preview/_version.py | 9 + .../v2023_01_02_preview/aio/__init__.py | 23 + .../v2023_01_02_preview/aio/_configuration.py | 72 + .../aio/_container_service_client.py | 159 + .../v2023_01_02_preview/aio/_patch.py | 20 + .../aio/operations/__init__.py | 39 + .../aio/operations/_agent_pools_operations.py | 1042 +++ .../_maintenance_configurations_operations.py | 457 + .../_managed_cluster_snapshots_operations.py | 676 ++ .../_managed_clusters_operations.py | 2857 ++++++ .../aio/operations/_operations.py | 141 + .../aio/operations/_patch.py | 20 + ...private_endpoint_connections_operations.py | 486 + .../_private_link_resources_operations.py | 124 + ...olve_private_link_service_id_operations.py | 206 + .../aio/operations/_snapshots_operations.py | 662 ++ ...trusted_access_role_bindings_operations.py | 457 + .../_trusted_access_roles_operations.py | 147 + .../v2023_01_02_preview/models/__init__.py | 383 + .../models/_container_service_client_enums.py | 802 ++ .../v2023_01_02_preview/models/_models_py3.py | 8068 +++++++++++++++++ .../v2023_01_02_preview/models/_patch.py | 20 + .../operations/__init__.py | 39 + .../operations/_agent_pools_operations.py | 1394 +++ .../_maintenance_configurations_operations.py | 628 ++ .../_managed_cluster_snapshots_operations.py | 903 ++ .../_managed_clusters_operations.py | 3774 ++++++++ .../operations/_operations.py | 165 + .../v2023_01_02_preview/operations/_patch.py | 20 + ...private_endpoint_connections_operations.py | 676 ++ .../_private_link_resources_operations.py | 169 + ...olve_private_link_service_id_operations.py | 254 + .../operations/_snapshots_operations.py | 887 ++ ...trusted_access_role_bindings_operations.py | 661 ++ .../_trusted_access_roles_operations.py | 180 + .../v2023_01_02_preview/py.typed | 1 + 881 files changed, 60623 insertions(+), 10119 deletions(-) create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_configuration.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_container_service_client.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_metadata.json create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_vendor.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_version.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_configuration.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_container_service_client.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_agent_pools_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_maintenance_configurations_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_managed_clusters_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_resolve_private_link_service_id_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_snapshots_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_container_service_client_enums.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_models_py3.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_agent_pools_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_maintenance_configurations_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_managed_clusters_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_link_resources_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_resolve_private_link_service_id_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_snapshots_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/py.typed create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_configuration.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_container_service_client.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_metadata.json create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_vendor.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_version.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_configuration.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_container_service_client.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_agent_pools_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_maintenance_configurations_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_cluster_snapshots_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_clusters_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_snapshots_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_role_bindings_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_roles_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_container_service_client_enums.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_models_py3.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_agent_pools_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_maintenance_configurations_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_cluster_snapshots_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_clusters_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_patch.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_link_resources_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_resolve_private_link_service_id_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_snapshots_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_role_bindings_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_roles_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/py.typed diff --git a/sdk/containerservice/azure-mgmt-containerservice/_meta.json b/sdk/containerservice/azure-mgmt-containerservice/_meta.json index cb1ee42575f4..91be484f844b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_meta.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_meta.json @@ -1,11 +1,11 @@ { - "commit": "fd9d1002c50c062e5108f6a26c9d1393f21decfc", + "commit": "c7b8c4f5cb19a9d7dbffd7af6751ed762f1f0ecc", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.0", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/containerservice/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/containerservice/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/containerservice/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py index a24d5c92252b..d7a59170eb35 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py @@ -53,7 +53,7 @@ class ContainerServiceClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2022-11-01' + DEFAULT_API_VERSION = '2023-01-01' _PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -140,6 +140,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2022-10-02-preview: :mod:`v2022_10_02_preview.models` * 2022-11-01: :mod:`v2022_11_01.models` * 2022-11-02-preview: :mod:`v2022_11_02_preview.models` + * 2023-01-01: :mod:`v2023_01_01.models` + * 2023-01-02-preview: :mod:`v2023_01_02_preview.models` """ if api_version == '2017-07-01': from .v2017_07_01 import models @@ -291,6 +293,12 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2022-11-02-preview': from .v2022_11_02_preview import models return models + elif api_version == '2023-01-01': + from .v2023_01_01 import models + return models + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -340,6 +348,8 @@ def agent_pools(self): * 2022-10-02-preview: :class:`AgentPoolsOperations` * 2022-11-01: :class:`AgentPoolsOperations` * 2022-11-02-preview: :class:`AgentPoolsOperations` + * 2023-01-01: :class:`AgentPoolsOperations` + * 2023-01-02-preview: :class:`AgentPoolsOperations` """ api_version = self._get_api_version('agent_pools') if api_version == '2019-02-01': @@ -428,6 +438,10 @@ def agent_pools(self): from .v2022_11_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import AgentPoolsOperations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import AgentPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) self._config.api_version = api_version @@ -520,6 +534,8 @@ def maintenance_configurations(self): * 2022-10-02-preview: :class:`MaintenanceConfigurationsOperations` * 2022-11-01: :class:`MaintenanceConfigurationsOperations` * 2022-11-02-preview: :class:`MaintenanceConfigurationsOperations` + * 2023-01-01: :class:`MaintenanceConfigurationsOperations` + * 2023-01-02-preview: :class:`MaintenanceConfigurationsOperations` """ api_version = self._get_api_version('maintenance_configurations') if api_version == '2020-12-01': @@ -580,6 +596,10 @@ def maintenance_configurations(self): from .v2022_11_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import MaintenanceConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) self._config.api_version = api_version @@ -600,6 +620,7 @@ def managed_cluster_snapshots(self): * 2022-09-02-preview: :class:`ManagedClusterSnapshotsOperations` * 2022-10-02-preview: :class:`ManagedClusterSnapshotsOperations` * 2022-11-02-preview: :class:`ManagedClusterSnapshotsOperations` + * 2023-01-02-preview: :class:`ManagedClusterSnapshotsOperations` """ api_version = self._get_api_version('managed_cluster_snapshots') if api_version == '2022-02-02-preview': @@ -624,6 +645,8 @@ def managed_cluster_snapshots(self): from .v2022_10_02_preview.operations import ManagedClusterSnapshotsOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import ManagedClusterSnapshotsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import ManagedClusterSnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_cluster_snapshots'".format(api_version)) self._config.api_version = api_version @@ -678,6 +701,8 @@ def managed_clusters(self): * 2022-10-02-preview: :class:`ManagedClustersOperations` * 2022-11-01: :class:`ManagedClustersOperations` * 2022-11-02-preview: :class:`ManagedClustersOperations` + * 2023-01-01: :class:`ManagedClustersOperations` + * 2023-01-02-preview: :class:`ManagedClustersOperations` """ api_version = self._get_api_version('managed_clusters') if api_version == '2018-03-31': @@ -770,6 +795,10 @@ def managed_clusters(self): from .v2022_11_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import ManagedClustersOperations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import ManagedClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) self._config.api_version = api_version @@ -847,6 +876,8 @@ def operations(self): * 2022-10-02-preview: :class:`Operations` * 2022-11-01: :class:`Operations` * 2022-11-02-preview: :class:`Operations` + * 2023-01-01: :class:`Operations` + * 2023-01-02-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2018-03-31': @@ -939,6 +970,10 @@ def operations(self): from .v2022_11_01.operations import Operations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import Operations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import Operations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) self._config.api_version = api_version @@ -981,6 +1016,8 @@ def private_endpoint_connections(self): * 2022-10-02-preview: :class:`PrivateEndpointConnectionsOperations` * 2022-11-01: :class:`PrivateEndpointConnectionsOperations` * 2022-11-02-preview: :class:`PrivateEndpointConnectionsOperations` + * 2023-01-01: :class:`PrivateEndpointConnectionsOperations` + * 2023-01-02-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2020-06-01': @@ -1049,6 +1086,10 @@ def private_endpoint_connections(self): from .v2022_11_01.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) self._config.api_version = api_version @@ -1089,6 +1130,8 @@ def private_link_resources(self): * 2022-10-02-preview: :class:`PrivateLinkResourcesOperations` * 2022-11-01: :class:`PrivateLinkResourcesOperations` * 2022-11-02-preview: :class:`PrivateLinkResourcesOperations` + * 2023-01-01: :class:`PrivateLinkResourcesOperations` + * 2023-01-02-preview: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2020-09-01': @@ -1153,6 +1196,10 @@ def private_link_resources(self): from .v2022_11_01.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) self._config.api_version = api_version @@ -1193,6 +1240,8 @@ def resolve_private_link_service_id(self): * 2022-10-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` * 2022-11-01: :class:`ResolvePrivateLinkServiceIdOperations` * 2022-11-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` + * 2023-01-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2023-01-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` """ api_version = self._get_api_version('resolve_private_link_service_id') if api_version == '2020-09-01': @@ -1257,6 +1306,10 @@ def resolve_private_link_service_id(self): from .v2022_11_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import ResolvePrivateLinkServiceIdOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) self._config.api_version = api_version @@ -1290,6 +1343,8 @@ def snapshots(self): * 2022-10-02-preview: :class:`SnapshotsOperations` * 2022-11-01: :class:`SnapshotsOperations` * 2022-11-02-preview: :class:`SnapshotsOperations` + * 2023-01-01: :class:`SnapshotsOperations` + * 2023-01-02-preview: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') if api_version == '2021-08-01': @@ -1340,6 +1395,10 @@ def snapshots(self): from .v2022_11_01.operations import SnapshotsOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import SnapshotsOperations as OperationClass + elif api_version == '2023-01-01': + from .v2023_01_01.operations import SnapshotsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) self._config.api_version = api_version @@ -1358,6 +1417,7 @@ def trusted_access_role_bindings(self): * 2022-09-02-preview: :class:`TrustedAccessRoleBindingsOperations` * 2022-10-02-preview: :class:`TrustedAccessRoleBindingsOperations` * 2022-11-02-preview: :class:`TrustedAccessRoleBindingsOperations` + * 2023-01-02-preview: :class:`TrustedAccessRoleBindingsOperations` """ api_version = self._get_api_version('trusted_access_role_bindings') if api_version == '2022-04-02-preview': @@ -1378,6 +1438,8 @@ def trusted_access_role_bindings(self): from .v2022_10_02_preview.operations import TrustedAccessRoleBindingsOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import TrustedAccessRoleBindingsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import TrustedAccessRoleBindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_role_bindings'".format(api_version)) self._config.api_version = api_version @@ -1396,6 +1458,7 @@ def trusted_access_roles(self): * 2022-09-02-preview: :class:`TrustedAccessRolesOperations` * 2022-10-02-preview: :class:`TrustedAccessRolesOperations` * 2022-11-02-preview: :class:`TrustedAccessRolesOperations` + * 2023-01-02-preview: :class:`TrustedAccessRolesOperations` """ api_version = self._get_api_version('trusted_access_roles') if api_version == '2022-04-02-preview': @@ -1416,6 +1479,8 @@ def trusted_access_roles(self): from .v2022_10_02_preview.operations import TrustedAccessRolesOperations as OperationClass elif api_version == '2022-11-02-preview': from .v2022_11_02_preview.operations import TrustedAccessRolesOperations as OperationClass + elif api_version == '2023-01-02-preview': + from .v2023_01_02_preview.operations import TrustedAccessRolesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_roles'".format(api_version)) self._config.api_version = api_version diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py index 2c170e28dbca..25467dfc00bb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py @@ -38,7 +38,22 @@ import re import sys import codecs -from typing import Optional, Union, AnyStr, IO, Mapping +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) try: from urllib import quote # type: ignore @@ -48,12 +63,14 @@ import isodate # type: ignore -from typing import Dict, Any, cast - from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + class RawDeserializer: @@ -277,8 +294,8 @@ class Model(object): _attribute_map: Dict[str, Dict[str, Any]] = {} _validation: Dict[str, Dict[str, Any]] = {} - def __init__(self, **kwargs): - self.additional_properties = {} + def __init__(self, **kwargs: Any) -> None: + self.additional_properties: Dict[str, Any] = {} for k in kwargs: if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -287,25 +304,25 @@ def __init__(self, **kwargs): else: setattr(self, k, kwargs[k]) - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" return not self.__eq__(other) - def __str__(self): + def __str__(self) -> str: return str(self.__dict__) @classmethod - def enable_additional_properties_sending(cls): + def enable_additional_properties_sending(cls) -> None: cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} @classmethod - def is_xml_model(cls): + def is_xml_model(cls) -> bool: try: cls._xml_map # type: ignore except AttributeError: @@ -322,7 +339,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - def serialize(self, keep_readonly=False, **kwargs): + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: """Return the JSON that would be sent to azure from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -336,8 +353,15 @@ def serialize(self, keep_readonly=False, **kwargs): serializer = Serializer(self._infer_class_models()) return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) - def as_dict(self, keep_readonly=True, key_transformer=attribute_transformer, **kwargs): - """Return a dict that can be JSONify using json.dump. + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[ + [str, Dict[str, Any], Any], Any + ] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. Advanced usage might optionally use a callback as parameter: @@ -384,7 +408,7 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls, data, content_type=None): + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. @@ -396,7 +420,12 @@ def deserialize(cls, data, content_type=None): return deserializer(cls.__name__, data, content_type=content_type) @classmethod - def from_dict(cls, data, key_extractors=None, content_type=None): + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: """Parse a dict using given key extractor return a model. By default consider key @@ -409,8 +438,8 @@ def from_dict(cls, data, key_extractors=None, content_type=None): :raises: DeserializationError if something went wrong """ deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( - [ + deserializer.key_extractors = ( # type: ignore + [ # type: ignore attribute_key_case_insensitive_extractor, rest_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, @@ -518,7 +547,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]]=None): self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -534,7 +563,7 @@ def __init__(self, classes=None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -626,8 +655,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore - unflattened = {k: new_attr} - new_attr = unflattened + new_attr = {k: new_attr} _new_attr = new_attr _serialized = serialized @@ -656,8 +684,8 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type, None) + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: @@ -777,6 +805,8 @@ def serialize_data(self, data, data_type, **kwargs): raise ValueError("No value for given attribute") try: + if data is AzureCoreNull: + return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) @@ -1161,7 +1191,8 @@ def rest_key_extractor(attr, attr_desc, data): working_data = data while "." in key: - dict_keys = _FLATTEN.split(key) + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1332,7 +1363,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]]=None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1352,7 +1383,7 @@ def __init__(self, classes=None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1471,7 +1502,7 @@ def _classify_target(self, target, data): Once classification has been determined, initialize object. :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. """ if target is None: return None, None @@ -1486,7 +1517,7 @@ def _classify_target(self, target, data): target = target._classify(data, self.dependencies) except AttributeError: pass # Target is not a Model, no classify - return target, target.__class__.__name__ + return target, target.__class__.__name__ # type: ignore def failsafe_deserialize(self, target_obj, data, content_type=None): """Ignores any errors encountered in deserialization, @@ -1496,7 +1527,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): a deserialization error. :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. """ try: diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py index 9687fb3d7358..e50c9085cbc1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py @@ -53,7 +53,7 @@ class ContainerServiceClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2022-11-01' + DEFAULT_API_VERSION = '2023-01-01' _PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -140,6 +140,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2022-10-02-preview: :mod:`v2022_10_02_preview.models` * 2022-11-01: :mod:`v2022_11_01.models` * 2022-11-02-preview: :mod:`v2022_11_02_preview.models` + * 2023-01-01: :mod:`v2023_01_01.models` + * 2023-01-02-preview: :mod:`v2023_01_02_preview.models` """ if api_version == '2017-07-01': from ..v2017_07_01 import models @@ -291,6 +293,12 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview import models return models + elif api_version == '2023-01-01': + from ..v2023_01_01 import models + return models + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -340,6 +348,8 @@ def agent_pools(self): * 2022-10-02-preview: :class:`AgentPoolsOperations` * 2022-11-01: :class:`AgentPoolsOperations` * 2022-11-02-preview: :class:`AgentPoolsOperations` + * 2023-01-01: :class:`AgentPoolsOperations` + * 2023-01-02-preview: :class:`AgentPoolsOperations` """ api_version = self._get_api_version('agent_pools') if api_version == '2019-02-01': @@ -428,6 +438,10 @@ def agent_pools(self): from ..v2022_11_01.aio.operations import AgentPoolsOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import AgentPoolsOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import AgentPoolsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import AgentPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) self._config.api_version = api_version @@ -520,6 +534,8 @@ def maintenance_configurations(self): * 2022-10-02-preview: :class:`MaintenanceConfigurationsOperations` * 2022-11-01: :class:`MaintenanceConfigurationsOperations` * 2022-11-02-preview: :class:`MaintenanceConfigurationsOperations` + * 2023-01-01: :class:`MaintenanceConfigurationsOperations` + * 2023-01-02-preview: :class:`MaintenanceConfigurationsOperations` """ api_version = self._get_api_version('maintenance_configurations') if api_version == '2020-12-01': @@ -580,6 +596,10 @@ def maintenance_configurations(self): from ..v2022_11_01.aio.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import MaintenanceConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) self._config.api_version = api_version @@ -600,6 +620,7 @@ def managed_cluster_snapshots(self): * 2022-09-02-preview: :class:`ManagedClusterSnapshotsOperations` * 2022-10-02-preview: :class:`ManagedClusterSnapshotsOperations` * 2022-11-02-preview: :class:`ManagedClusterSnapshotsOperations` + * 2023-01-02-preview: :class:`ManagedClusterSnapshotsOperations` """ api_version = self._get_api_version('managed_cluster_snapshots') if api_version == '2022-02-02-preview': @@ -624,6 +645,8 @@ def managed_cluster_snapshots(self): from ..v2022_10_02_preview.aio.operations import ManagedClusterSnapshotsOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import ManagedClusterSnapshotsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import ManagedClusterSnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_cluster_snapshots'".format(api_version)) self._config.api_version = api_version @@ -678,6 +701,8 @@ def managed_clusters(self): * 2022-10-02-preview: :class:`ManagedClustersOperations` * 2022-11-01: :class:`ManagedClustersOperations` * 2022-11-02-preview: :class:`ManagedClustersOperations` + * 2023-01-01: :class:`ManagedClustersOperations` + * 2023-01-02-preview: :class:`ManagedClustersOperations` """ api_version = self._get_api_version('managed_clusters') if api_version == '2018-03-31': @@ -770,6 +795,10 @@ def managed_clusters(self): from ..v2022_11_01.aio.operations import ManagedClustersOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import ManagedClustersOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import ManagedClustersOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import ManagedClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) self._config.api_version = api_version @@ -847,6 +876,8 @@ def operations(self): * 2022-10-02-preview: :class:`Operations` * 2022-11-01: :class:`Operations` * 2022-11-02-preview: :class:`Operations` + * 2023-01-01: :class:`Operations` + * 2023-01-02-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2018-03-31': @@ -939,6 +970,10 @@ def operations(self): from ..v2022_11_01.aio.operations import Operations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import Operations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import Operations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) self._config.api_version = api_version @@ -981,6 +1016,8 @@ def private_endpoint_connections(self): * 2022-10-02-preview: :class:`PrivateEndpointConnectionsOperations` * 2022-11-01: :class:`PrivateEndpointConnectionsOperations` * 2022-11-02-preview: :class:`PrivateEndpointConnectionsOperations` + * 2023-01-01: :class:`PrivateEndpointConnectionsOperations` + * 2023-01-02-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2020-06-01': @@ -1049,6 +1086,10 @@ def private_endpoint_connections(self): from ..v2022_11_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) self._config.api_version = api_version @@ -1089,6 +1130,8 @@ def private_link_resources(self): * 2022-10-02-preview: :class:`PrivateLinkResourcesOperations` * 2022-11-01: :class:`PrivateLinkResourcesOperations` * 2022-11-02-preview: :class:`PrivateLinkResourcesOperations` + * 2023-01-01: :class:`PrivateLinkResourcesOperations` + * 2023-01-02-preview: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2020-09-01': @@ -1153,6 +1196,10 @@ def private_link_resources(self): from ..v2022_11_01.aio.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) self._config.api_version = api_version @@ -1193,6 +1240,8 @@ def resolve_private_link_service_id(self): * 2022-10-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` * 2022-11-01: :class:`ResolvePrivateLinkServiceIdOperations` * 2022-11-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` + * 2023-01-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2023-01-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` """ api_version = self._get_api_version('resolve_private_link_service_id') if api_version == '2020-09-01': @@ -1257,6 +1306,10 @@ def resolve_private_link_service_id(self): from ..v2022_11_01.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) self._config.api_version = api_version @@ -1290,6 +1343,8 @@ def snapshots(self): * 2022-10-02-preview: :class:`SnapshotsOperations` * 2022-11-01: :class:`SnapshotsOperations` * 2022-11-02-preview: :class:`SnapshotsOperations` + * 2023-01-01: :class:`SnapshotsOperations` + * 2023-01-02-preview: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') if api_version == '2021-08-01': @@ -1340,6 +1395,10 @@ def snapshots(self): from ..v2022_11_01.aio.operations import SnapshotsOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import SnapshotsOperations as OperationClass + elif api_version == '2023-01-01': + from ..v2023_01_01.aio.operations import SnapshotsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) self._config.api_version = api_version @@ -1358,6 +1417,7 @@ def trusted_access_role_bindings(self): * 2022-09-02-preview: :class:`TrustedAccessRoleBindingsOperations` * 2022-10-02-preview: :class:`TrustedAccessRoleBindingsOperations` * 2022-11-02-preview: :class:`TrustedAccessRoleBindingsOperations` + * 2023-01-02-preview: :class:`TrustedAccessRoleBindingsOperations` """ api_version = self._get_api_version('trusted_access_role_bindings') if api_version == '2022-04-02-preview': @@ -1378,6 +1438,8 @@ def trusted_access_role_bindings(self): from ..v2022_10_02_preview.aio.operations import TrustedAccessRoleBindingsOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import TrustedAccessRoleBindingsOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import TrustedAccessRoleBindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_role_bindings'".format(api_version)) self._config.api_version = api_version @@ -1396,6 +1458,7 @@ def trusted_access_roles(self): * 2022-09-02-preview: :class:`TrustedAccessRolesOperations` * 2022-10-02-preview: :class:`TrustedAccessRolesOperations` * 2022-11-02-preview: :class:`TrustedAccessRolesOperations` + * 2023-01-02-preview: :class:`TrustedAccessRolesOperations` """ api_version = self._get_api_version('trusted_access_roles') if api_version == '2022-04-02-preview': @@ -1416,6 +1479,8 @@ def trusted_access_roles(self): from ..v2022_10_02_preview.aio.operations import TrustedAccessRolesOperations as OperationClass elif api_version == '2022-11-02-preview': from ..v2022_11_02_preview.aio.operations import TrustedAccessRolesOperations as OperationClass + elif api_version == '2023-01-02-preview': + from ..v2023_01_02_preview.aio.operations import TrustedAccessRolesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_roles'".format(api_version)) self._config.api_version = api_version diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py index 4101652e3d7c..1e0f2b867f28 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py @@ -7,4 +7,4 @@ from .v2017_07_01.models import * from .v2019_04_30.models import * from .v2022_09_02_preview.models import * -from .v2022_11_01.models import * +from .v2023_01_01.models import * diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py index 6a1ed3703c63..90ba6678155e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py @@ -88,5 +88,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json index 3436b24fc80d..736cbaa97f56 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py index ea9b34e36751..2fe5b3016c5f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py @@ -88,5 +88,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py index 035be252910a..faad3735814b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py @@ -313,7 +313,7 @@ async def begin_create_or_update( and resource group. Required. :type container_service_name: str :param parameters: Parameters supplied to the Create or Update a Container Service operation. - Is either a model type or a IO type. Required. + Is either a ContainerService type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py index 3ced7dc7be89..566c71e61932 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -50,7 +50,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -157,8 +157,8 @@ def __init__( windows_profile: Optional["_models.ContainerServiceWindowsProfile"] = None, linux_profile: Optional["_models.ContainerServiceLinuxProfile"] = None, diagnostics_profile: Optional["_models.ContainerServiceDiagnosticsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -312,8 +312,8 @@ def __init__( storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, vnet_subnet_id: Optional[str] = None, os_type: Union[str, "_models.OSType"] = "Linux", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the agent pool profile in the context of the subscription and resource group. Required. @@ -411,7 +411,7 @@ class ContainerServiceCustomProfile(_serialization.Model): "orchestrator": {"key": "orchestrator", "type": "str"}, } - def __init__(self, *, orchestrator: str, **kwargs): + def __init__(self, *, orchestrator: str, **kwargs: Any) -> None: """ :keyword orchestrator: The name of the custom orchestrator to use. Required. :paramtype orchestrator: str @@ -438,7 +438,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -469,7 +469,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -502,7 +502,7 @@ class ContainerServiceListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ContainerService"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ContainerService"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of container services. :paramtype value: list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] @@ -610,8 +610,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -713,8 +713,8 @@ def __init__( *, orchestrator_type: Union[str, "_models.ContainerServiceOrchestratorTypes"], orchestrator_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword orchestrator_type: The orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Required. Known @@ -731,7 +731,8 @@ def __init__( class ContainerServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. Either secret or keyVaultSecretRef must be specified. All required parameters must be populated in order to send to Azure. @@ -760,8 +761,8 @@ def __init__( client_id: str, secret: Optional[str] = None, key_vault_secret_ref: Optional["_models.KeyVaultSecretRef"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -796,7 +797,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -825,7 +826,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -858,7 +859,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -892,7 +893,7 @@ class ContainerServiceWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: str, **kwargs): + def __init__(self, *, admin_username: str, admin_password: str, **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Windows VMs. Required. :paramtype admin_username: str @@ -928,7 +929,7 @@ class KeyVaultSecretRef(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, vault_id: str, secret_name: str, version: Optional[str] = None, **kwargs): + def __init__(self, *, vault_id: str, secret_name: str, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword vault_id: Key vault identifier. Required. :paramtype vault_id: str @@ -972,8 +973,8 @@ def __init__( orchestrator_version: str, orchestrator_type: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword orchestrator_type: Orchestrator type. :paramtype orchestrator_type: str @@ -1026,8 +1027,8 @@ def __init__( default: Optional[bool] = None, is_preview: Optional[bool] = None, upgrades: Optional[List["_models.OrchestratorProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword orchestrator_type: Orchestrator type. Required. :paramtype orchestrator_type: str @@ -1080,7 +1081,7 @@ class OrchestratorVersionProfileListResult(_serialization.Model): "orchestrators": {"key": "properties.orchestrators", "type": "[OrchestratorVersionProfile]"}, } - def __init__(self, *, orchestrators: List["_models.OrchestratorVersionProfile"], **kwargs): + def __init__(self, *, orchestrators: List["_models.OrchestratorVersionProfile"], **kwargs: Any) -> None: """ :keyword orchestrators: List of orchestrator version profiles. Required. :paramtype orchestrators: diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py index dc323135a88b..41a5e56cab89 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py @@ -484,7 +484,7 @@ def begin_create_or_update( and resource group. Required. :type container_service_name: str :param parameters: Parameters supplied to the Create or Update a Container Service operation. - Is either a model type or a IO type. Required. + Is either a ContainerService type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_container_service_client.py index 75dcb55f69ca..0a60105752cf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_container_service_client.py @@ -94,5 +94,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_metadata.json index 2850f168e39d..662427796eaa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/_container_service_client.py index c5f8d62e59ed..5f5eb249256d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/_container_service_client.py @@ -94,5 +94,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/operations/_managed_clusters_operations.py index 00d01c75f20f..52ade11eb2d3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/aio/operations/_managed_clusters_operations.py @@ -729,7 +729,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -947,7 +947,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1279,7 +1279,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1496,7 +1496,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/models/_models_py3.py index 0e1ecb053387..8dc4918eb098 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -34,7 +34,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -65,7 +65,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -176,8 +176,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -298,8 +298,8 @@ def __init__( service_cidr: str = "10.0.0.0/16", dns_service_ip: str = "10.0.0.10", docker_bridge_cidr: str = "172.17.0.1/16", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -346,7 +346,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -375,7 +375,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -408,7 +408,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -442,7 +442,7 @@ class ContainerServiceWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: str, **kwargs): + def __init__(self, *, admin_username: str, admin_password: str, **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Windows VMs. Required. :paramtype admin_username: str @@ -475,7 +475,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -499,7 +499,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -539,7 +539,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -652,8 +652,8 @@ def __init__( enable_rbac: Optional[bool] = None, network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -736,8 +736,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -794,8 +794,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -828,7 +833,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "config": {"key": "config", "type": "{str}"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -939,8 +944,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, max_pods: Optional[int] = None, os_type: Union[str, "_models.OSType"] = "Linux", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the agent pool profile in the context of the subscription and resource group. Required. @@ -1031,7 +1036,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2018_03_31.models.ManagedCluster] @@ -1076,8 +1081,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -1097,7 +1102,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -1116,7 +1122,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -1171,8 +1177,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -1207,7 +1213,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -1250,7 +1256,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -1282,7 +1288,7 @@ class OrchestratorProfile(_serialization.Model): "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, } - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs): + def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs: Any) -> None: """ :keyword orchestrator_type: Orchestrator type. Required. :paramtype orchestrator_type: str @@ -1305,7 +1311,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/operations/_managed_clusters_operations.py index f6ccc5c56917..2e758f7529d5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/operations/_managed_clusters_operations.py @@ -1079,7 +1079,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1297,7 +1297,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1629,7 +1629,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1846,7 +1846,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_03_31.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_container_service_client.py index 0754ff291f9d..79d028d18055 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_container_service_client.py @@ -94,5 +94,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_metadata.json index 22c9b7370d4f..b1c8551cf73b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/_container_service_client.py index c0cc0f7faae9..ec0a127caab8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/_container_service_client.py @@ -94,5 +94,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/operations/_managed_clusters_operations.py index 1844901614c0..c6b1e0e4fe6a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/aio/operations/_managed_clusters_operations.py @@ -745,7 +745,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -967,7 +967,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1307,7 +1307,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1530,7 +1530,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/models/_models_py3.py index 5a40b2de3a50..feeb49a07640 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -46,8 +46,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -87,7 +87,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -119,7 +119,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -230,8 +230,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -354,8 +354,8 @@ def __init__( service_cidr: str = "10.0.0.0/16", dns_service_ip: str = "10.0.0.10", docker_bridge_cidr: str = "172.17.0.1/16", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -404,7 +404,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -433,7 +433,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -466,7 +466,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -500,7 +500,7 @@ class ContainerServiceWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: str, **kwargs): + def __init__(self, *, admin_username: str, admin_password: str, **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Windows VMs. Required. :paramtype admin_username: str @@ -533,7 +533,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -558,7 +558,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -598,7 +598,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -711,8 +711,8 @@ def __init__( enable_rbac: Optional[bool] = None, network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -794,8 +794,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -852,8 +852,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -886,7 +891,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "config": {"key": "config", "type": "{str}"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1006,8 +1011,8 @@ def __init__( min_count: Optional[int] = None, enable_auto_scaling: Optional[bool] = None, type: Optional[Union[str, "_models.AgentPoolType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the agent pool profile in the context of the subscription and resource group. Required. @@ -1110,7 +1115,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] @@ -1155,8 +1160,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -1176,7 +1181,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -1195,7 +1201,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -1250,8 +1256,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -1286,7 +1292,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -1329,7 +1335,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -1361,7 +1367,7 @@ class OrchestratorProfile(_serialization.Model): "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, } - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs): + def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs: Any) -> None: """ :keyword orchestrator_type: Orchestrator type. Required. :paramtype orchestrator_type: str @@ -1384,7 +1390,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/operations/_managed_clusters_operations.py index 089fdeff3172..039a3a4c6a02 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/operations/_managed_clusters_operations.py @@ -1125,7 +1125,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1347,7 +1347,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1687,7 +1687,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1910,7 +1910,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_container_service_client.py index bd0cb6bf9f41..57e94fea5180 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_container_service_client.py @@ -91,5 +91,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_metadata.json index 19a36ea098a8..b89c7aa3b900 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/_container_service_client.py index de986e04079f..53386b7a73f4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/_container_service_client.py @@ -91,5 +91,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py index 7804df0a9023..25283853c65d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py @@ -483,7 +483,7 @@ async def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -708,7 +708,7 @@ async def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_09_30_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/_models_py3.py index 6c5be89a2a8f..0f355ea618e7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -46,8 +46,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -83,7 +83,7 @@ class NetworkProfile(_serialization.Model): "peer_vnet_id": {"key": "peerVnetId", "type": "str"}, } - def __init__(self, *, vnet_cidr: str = "10.0.0.0/8", peer_vnet_id: Optional[str] = None, **kwargs): + def __init__(self, *, vnet_cidr: str = "10.0.0.0/8", peer_vnet_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword vnet_cidr: CIDR for the OpenShift Vnet. :paramtype vnet_cidr: str @@ -129,7 +129,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -235,8 +235,8 @@ def __init__( master_pool_profile: Optional["_models.OpenShiftManagedClusterMasterPoolProfile"] = None, agent_pool_profiles: Optional[List["_models.OpenShiftManagedClusterAgentPoolProfile"]] = None, auth_profile: Optional["_models.OpenShiftManagedClusterAuthProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -301,7 +301,7 @@ class OpenShiftManagedClusterBaseIdentityProvider(_serialization.Model): _subtype_map = {"kind": {"AADIdentityProvider": "OpenShiftManagedClusterAADIdentityProvider"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kind: Optional[str] = None @@ -343,8 +343,8 @@ def __init__( secret: Optional[str] = None, tenant_id: Optional[str] = None, customer_admin_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_id: The clientId password associated with the provider. :paramtype client_id: str @@ -417,8 +417,8 @@ def __init__( subnet_cidr: str = "10.0.0.0/24", os_type: Union[str, "_models.OSType"] = "Linux", role: Optional[Union[str, "_models.OpenShiftAgentPoolProfileRole"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the pool profile in the context of the subscription and resource group. Required. @@ -467,8 +467,11 @@ class OpenShiftManagedClusterAuthProfile(_serialization.Model): } def __init__( - self, *, identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, **kwargs - ): + self, + *, + identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, + **kwargs: Any + ) -> None: """ :keyword identity_providers: Type of authentication profile to use. :paramtype identity_providers: @@ -498,8 +501,8 @@ def __init__( *, name: Optional[str] = None, provider: Optional["_models.OpenShiftManagedClusterBaseIdentityProvider"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the provider. :paramtype name: str @@ -533,7 +536,7 @@ class OpenShiftManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of OpenShift managed clusters. :paramtype value: @@ -593,8 +596,8 @@ def __init__( name: Optional[str] = None, subnet_cidr: Optional[str] = None, os_type: Union[str, "_models.OSType"] = "Linux", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the master pool profile in the context of the subscription and resource group. @@ -649,7 +652,7 @@ class OpenShiftRouterProfile(_serialization.Model): "fqdn": {"key": "fqdn", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, public_subdomain: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, public_subdomain: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Name of the router profile. :paramtype name: str @@ -690,8 +693,8 @@ def __init__( product: Optional[str] = None, promotion_code: Optional[str] = None, publisher: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The plan ID. :paramtype name: str @@ -721,7 +724,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/_open_shift_managed_clusters_operations.py index 53372f4f46c1..44fa6da908b5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/_open_shift_managed_clusters_operations.py @@ -672,7 +672,7 @@ def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -897,7 +897,7 @@ def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2018_09_30_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_container_service_client.py index fa655ff6bd03..4345a4bd77df 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_metadata.json index f837ebf1b3bf..84d97a40b6dc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/_container_service_client.py index e5865ad67ad2..867d7aee22ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_agent_pools_operations.py index 7ca5dd020a50..df9608896640 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_managed_clusters_operations.py index 9506a73afc47..436c28224603 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/aio/operations/_managed_clusters_operations.py @@ -729,7 +729,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -947,7 +947,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1279,7 +1279,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1496,7 +1496,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/models/_models_py3.py index 871bd5609f31..9fca25c954e6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -180,8 +180,8 @@ def __init__( type_properties_type: Optional[Union[str, "_models.AgentPoolType"]] = None, orchestrator_version: Optional[str] = None, availability_zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -290,7 +290,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2019_02_01.models.AgentPool] @@ -330,8 +330,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -370,7 +370,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -401,7 +401,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -512,8 +512,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -635,8 +635,8 @@ def __init__( service_cidr: str = "10.0.0.0/16", dns_service_ip: str = "10.0.0.10", docker_bridge_cidr: str = "172.17.0.1/16", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -684,7 +684,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -713,7 +713,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -746,7 +746,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -780,7 +780,7 @@ class ContainerServiceWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: str, **kwargs): + def __init__(self, *, admin_username: str, admin_password: str, **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Windows VMs. Required. :paramtype admin_username: str @@ -813,7 +813,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -837,7 +837,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -877,7 +877,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -999,8 +999,8 @@ def __init__( network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, api_server_authorized_ip_ranges: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1091,8 +1091,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1149,8 +1149,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1183,7 +1188,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "config": {"key": "config", "type": "{str}"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1314,8 +1319,8 @@ def __init__( type: Optional[Union[str, "_models.AgentPoolType"]] = None, orchestrator_version: Optional[str] = None, availability_zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1530,8 +1535,8 @@ def __init__( type: Optional[Union[str, "_models.AgentPoolType"]] = None, orchestrator_version: Optional[str] = None, availability_zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1644,7 +1649,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] @@ -1689,8 +1694,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -1710,7 +1715,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -1729,7 +1735,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -1784,8 +1790,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -1820,7 +1826,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -1863,7 +1869,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -1895,7 +1901,7 @@ class OrchestratorProfile(_serialization.Model): "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, } - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs): + def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs: Any) -> None: """ :keyword orchestrator_type: Orchestrator type. Required. :paramtype orchestrator_type: str @@ -1918,7 +1924,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_agent_pools_operations.py index 46a6753deb3e..b6541011ee07 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_agent_pools_operations.py @@ -523,7 +523,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_managed_clusters_operations.py index db082d88c079..00f91c2ed0d5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/operations/_managed_clusters_operations.py @@ -1091,7 +1091,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1309,7 +1309,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1641,7 +1641,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1858,7 +1858,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_container_service_client.py index afce09e80cb3..4dbc668168b5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_metadata.json index d1661ef63d17..af73eb32d9d4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/_container_service_client.py index 0a094559bfbd..b0b855ca6fa5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_agent_pools_operations.py index f92ed11e8a40..fbe3b66bb7f6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_agent_pools_operations.py @@ -399,7 +399,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_managed_clusters_operations.py index f424980ce714..f6a9a48958e1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/aio/operations/_managed_clusters_operations.py @@ -729,7 +729,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -947,7 +947,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1279,7 +1279,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1496,7 +1496,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/models/_models_py3.py index 081065bbb339..63f749df9ef1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -180,8 +180,8 @@ def __init__( type_properties_type: Optional[Union[str, "_models.AgentPoolType"]] = None, orchestrator_version: Optional[str] = None, availability_zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -290,7 +290,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] @@ -330,8 +330,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -370,7 +370,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -401,7 +401,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -512,8 +512,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -641,8 +641,8 @@ def __init__( dns_service_ip: str = "10.0.0.10", docker_bridge_cidr: str = "172.17.0.1/16", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -695,7 +695,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -724,7 +724,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -757,7 +757,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -788,7 +788,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -812,7 +812,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -852,7 +852,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -987,8 +987,8 @@ def __init__( network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, api_server_authorized_ip_ranges: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1089,8 +1089,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1147,8 +1147,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1181,7 +1186,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "config": {"key": "config", "type": "{str}"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1312,8 +1317,8 @@ def __init__( type: Optional[Union[str, "_models.AgentPoolType"]] = None, orchestrator_version: Optional[str] = None, availability_zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1528,8 +1533,8 @@ def __init__( type: Optional[Union[str, "_models.AgentPoolType"]] = None, orchestrator_version: Optional[str] = None, availability_zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1651,7 +1656,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -1685,7 +1690,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] @@ -1731,8 +1736,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -1766,7 +1771,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -1779,7 +1786,8 @@ def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Opti class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -1798,7 +1806,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -1853,8 +1861,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -1904,7 +1912,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -1945,7 +1953,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -1988,7 +1996,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -2010,7 +2018,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_agent_pools_operations.py index 8750dc950bb1..04674fc0ed71 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_agent_pools_operations.py @@ -551,7 +551,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_managed_clusters_operations.py index d7ec45d1328d..050a02ca0b9a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_01/operations/_managed_clusters_operations.py @@ -1161,7 +1161,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1379,7 +1379,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1711,7 +1711,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1928,7 +1928,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_container_service_client.py index 6a8ac57ed1d9..f9d833833990 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_container_service_client.py @@ -91,5 +91,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_metadata.json index 39126f16c9ad..88caa235fad4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/_container_service_client.py index 11911bf972fe..591207a5fc43 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/_container_service_client.py @@ -91,5 +91,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/operations/_open_shift_managed_clusters_operations.py index 8e523f0aedbb..8a64d628c2c5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/aio/operations/_open_shift_managed_clusters_operations.py @@ -474,7 +474,7 @@ async def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_30.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -694,7 +694,7 @@ async def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_30.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/_models_py3.py index 4d0fb3248270..5b539c2c8d43 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -46,8 +46,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -91,8 +91,8 @@ def __init__( vnet_cidr: str = "10.0.0.0/8", peer_vnet_id: Optional[str] = None, vnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vnet_cidr: CIDR for the OpenShift Vnet. :paramtype vnet_cidr: str @@ -141,7 +141,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -250,8 +250,8 @@ def __init__( master_pool_profile: Optional["_models.OpenShiftManagedClusterMasterPoolProfile"] = None, agent_pool_profiles: Optional[List["_models.OpenShiftManagedClusterAgentPoolProfile"]] = None, auth_profile: Optional["_models.OpenShiftManagedClusterAuthProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -312,7 +312,7 @@ class OpenShiftManagedClusterBaseIdentityProvider(_serialization.Model): _subtype_map = {"kind": {"AADIdentityProvider": "OpenShiftManagedClusterAADIdentityProvider"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kind: Optional[str] = None @@ -354,8 +354,8 @@ def __init__( secret: Optional[str] = None, tenant_id: Optional[str] = None, customer_admin_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_id: The clientId password associated with the provider. :paramtype client_id: str @@ -428,8 +428,8 @@ def __init__( subnet_cidr: str = "10.0.0.0/24", os_type: Union[str, "_models.OSType"] = "Linux", role: Optional[Union[str, "_models.OpenShiftAgentPoolProfileRole"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the pool profile in the context of the subscription and resource group. Required. @@ -478,8 +478,11 @@ class OpenShiftManagedClusterAuthProfile(_serialization.Model): } def __init__( - self, *, identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, **kwargs - ): + self, + *, + identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, + **kwargs: Any + ) -> None: """ :keyword identity_providers: Type of authentication profile to use. :paramtype identity_providers: @@ -509,8 +512,8 @@ def __init__( *, name: Optional[str] = None, provider: Optional["_models.OpenShiftManagedClusterBaseIdentityProvider"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the provider. :paramtype name: str @@ -543,7 +546,7 @@ class OpenShiftManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of OpenShift managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2019_04_30.models.OpenShiftManagedCluster] @@ -602,8 +605,8 @@ def __init__( name: Optional[str] = None, subnet_cidr: Optional[str] = None, os_type: Union[str, "_models.OSType"] = "Linux", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the master pool profile in the context of the subscription and resource group. @@ -659,7 +662,7 @@ class OpenShiftRouterProfile(_serialization.Model): "fqdn": {"key": "fqdn", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Name of the router profile. :paramtype name: str @@ -698,8 +701,8 @@ def __init__( product: Optional[str] = None, promotion_code: Optional[str] = None, publisher: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The plan ID. :paramtype name: str @@ -729,7 +732,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/operations/_open_shift_managed_clusters_operations.py index 65980ae33c3b..aa6b9a415191 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/operations/_open_shift_managed_clusters_operations.py @@ -651,7 +651,7 @@ def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_30.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -871,7 +871,7 @@ def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_04_30.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_container_service_client.py index e6ec257e04f2..020fa6d1de59 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_metadata.json index 87edc5cb1dad..f26e9ad2a6cc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/_container_service_client.py index 515b2aec6a54..c4de70b77c9e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_agent_pools_operations.py index e7f28b75cfd2..76950ad79135 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_managed_clusters_operations.py index 2f1bfb4fa082..3886653013fd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_managed_clusters_operations.py @@ -729,7 +729,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -947,7 +947,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1279,7 +1279,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1496,7 +1496,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/models/_models_py3.py index a30c0aaa42e5..bdd28746e44e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -201,8 +201,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -345,8 +345,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -382,8 +382,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -418,7 +418,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2019_06_01.models.AgentPool] @@ -474,8 +474,8 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -509,7 +509,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -551,8 +553,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -591,7 +593,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -622,7 +624,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -733,8 +735,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -862,8 +864,8 @@ def __init__( dns_service_ip: str = "10.0.0.10", docker_bridge_cidr: str = "172.17.0.1/16", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -916,7 +918,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -945,7 +947,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -978,7 +980,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1009,7 +1011,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1033,7 +1035,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1073,7 +1075,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1208,8 +1210,8 @@ def __init__( network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, api_server_authorized_ip_ranges: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1310,8 +1312,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1368,8 +1370,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1402,7 +1409,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "config": {"key": "config", "type": "{str}"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1551,8 +1558,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1805,8 +1812,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1946,7 +1953,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -1980,7 +1987,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2019_06_01.models.ManagedCluster] @@ -2026,8 +2033,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2061,7 +2068,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2074,7 +2083,8 @@ def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Opti class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2093,7 +2103,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -2148,8 +2158,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -2199,7 +2209,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -2240,7 +2250,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2283,7 +2293,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -2305,7 +2315,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_agent_pools_operations.py index 873b0185a75a..424ade75d378 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_managed_clusters_operations.py index b2e4900655df..adef2b2cfa91 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/operations/_managed_clusters_operations.py @@ -1161,7 +1161,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1379,7 +1379,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1711,7 +1711,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1928,7 +1928,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_06_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_container_service_client.py index 6d5c17c1cb87..451a2a048581 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_metadata.json index 005ec641dd2c..cb262e3b3d7e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/_container_service_client.py index a34369e9599c..9034dbc80ce0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py index b5dab59b4b6f..7a0bf5533062 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_managed_clusters_operations.py index 2a78ea0bb123..6b6cd8ad6b24 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_managed_clusters_operations.py @@ -730,7 +730,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -948,7 +948,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1280,7 +1280,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1497,7 +1497,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/models/_models_py3.py index ff9959aa2f6f..38496be3a4c2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -201,8 +201,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -345,8 +345,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -382,8 +382,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -418,7 +418,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPool] @@ -474,8 +474,8 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -509,7 +509,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -551,8 +553,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -591,7 +593,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -622,7 +624,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -733,8 +735,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -867,8 +869,8 @@ def __init__( docker_bridge_cidr: str = "172.17.0.1/16", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -925,7 +927,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -954,7 +956,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -987,7 +989,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1018,7 +1020,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1042,7 +1044,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1082,7 +1084,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1221,8 +1223,8 @@ def __init__( network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1323,8 +1325,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1381,8 +1383,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1415,7 +1422,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "config": {"key": "config", "type": "{str}"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1564,8 +1571,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1818,8 +1825,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1949,8 +1956,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -1991,7 +1998,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2025,7 +2032,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] @@ -2073,8 +2080,8 @@ def __init__( outbound_ip_prefixes: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPs"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2114,7 +2121,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2136,7 +2143,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2157,7 +2166,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] @@ -2202,8 +2211,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2237,7 +2246,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2250,7 +2261,8 @@ def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Opti class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2269,7 +2281,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -2324,8 +2336,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -2375,7 +2387,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -2416,7 +2428,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2459,7 +2471,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -2481,7 +2493,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -2501,7 +2513,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_agent_pools_operations.py index 96ae8a387506..f6be1361156d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_managed_clusters_operations.py index e70984b7b398..434297f782ee 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/operations/_managed_clusters_operations.py @@ -1199,7 +1199,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1417,7 +1417,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1749,7 +1749,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1966,7 +1966,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py index 119b9265e7bd..1cf71744831f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py @@ -91,5 +91,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json index 68a32a0f1466..7e3a8d4f82c7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py index 58b50903ef25..3bc70cd538a9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py @@ -91,5 +91,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py index ef4ffd31bb37..78bce2cc4adf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py @@ -483,7 +483,7 @@ async def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_09_30_preview.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -708,7 +708,7 @@ async def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_09_30_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py index 321d93c3d1c6..a91c45e6789e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -46,8 +46,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -92,8 +92,8 @@ def __init__( vnet_cidr: str = "10.0.0.0/8", peer_vnet_id: Optional[str] = None, vnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vnet_cidr: CIDR for the OpenShift Vnet. :paramtype vnet_cidr: str @@ -142,7 +142,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -257,8 +257,8 @@ def __init__( agent_pool_profiles: Optional[List["_models.OpenShiftManagedClusterAgentPoolProfile"]] = None, auth_profile: Optional["_models.OpenShiftManagedClusterAuthProfile"] = None, monitor_profile: Optional["_models.OpenShiftManagedClusterMonitorProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -324,7 +324,7 @@ class OpenShiftManagedClusterBaseIdentityProvider(_serialization.Model): _subtype_map = {"kind": {"AADIdentityProvider": "OpenShiftManagedClusterAADIdentityProvider"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kind: Optional[str] = None @@ -366,8 +366,8 @@ def __init__( secret: Optional[str] = None, tenant_id: Optional[str] = None, customer_admin_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_id: The clientId password associated with the provider. :paramtype client_id: str @@ -440,8 +440,8 @@ def __init__( subnet_cidr: str = "10.0.0.0/24", os_type: Union[str, "_models.OSType"] = "Linux", role: Optional[Union[str, "_models.OpenShiftAgentPoolProfileRole"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the pool profile in the context of the subscription and resource group. Required. @@ -490,8 +490,11 @@ class OpenShiftManagedClusterAuthProfile(_serialization.Model): } def __init__( - self, *, identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, **kwargs - ): + self, + *, + identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, + **kwargs: Any + ) -> None: """ :keyword identity_providers: Type of authentication profile to use. :paramtype identity_providers: @@ -521,8 +524,8 @@ def __init__( *, name: Optional[str] = None, provider: Optional["_models.OpenShiftManagedClusterBaseIdentityProvider"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the provider. :paramtype name: str @@ -556,7 +559,7 @@ class OpenShiftManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of OpenShift managed clusters. :paramtype value: @@ -616,8 +619,8 @@ def __init__( name: Optional[str] = None, subnet_cidr: Optional[str] = None, os_type: Union[str, "_models.OSType"] = "Linux", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the master pool profile in the context of the subscription and resource group. @@ -664,7 +667,9 @@ class OpenShiftManagedClusterMonitorProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, workspace_resource_id: Optional[str] = None, enabled: Optional[bool] = None, **kwargs): + def __init__( + self, *, workspace_resource_id: Optional[str] = None, enabled: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword workspace_resource_id: Azure Resource Manager Resource ID for the Log Analytics workspace to integrate with. @@ -701,7 +706,7 @@ class OpenShiftRouterProfile(_serialization.Model): "fqdn": {"key": "fqdn", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Name of the router profile. :paramtype name: str @@ -740,8 +745,8 @@ def __init__( product: Optional[str] = None, promotion_code: Optional[str] = None, publisher: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The plan ID. :paramtype name: str @@ -771,7 +776,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py index d197d00e9b52..45e17bd33311 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py @@ -672,7 +672,7 @@ def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_09_30_preview.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -897,7 +897,7 @@ def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_09_30_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_container_service_client.py index 3754c651d41e..85259758e2f6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_metadata.json index 5d3e37c1d494..0342d29122f9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/_container_service_client.py index 5d070f5e5f7b..cc0bcd907453 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_agent_pools_operations.py index db8399e1cda3..423bee80fa13 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_managed_clusters_operations.py index 5cdf3aff7ca4..17465672778f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/aio/operations/_managed_clusters_operations.py @@ -796,7 +796,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1014,7 +1014,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1346,7 +1346,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1563,7 +1563,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/models/_models_py3.py index afdc1d9bd309..07827b137dd7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -201,8 +201,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -345,8 +345,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -382,8 +382,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -418,7 +418,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPool] @@ -474,8 +474,8 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -509,7 +509,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -551,8 +553,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -591,7 +593,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -622,7 +624,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -733,8 +735,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -867,8 +869,8 @@ def __init__( docker_bridge_cidr: str = "172.17.0.1/16", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -925,7 +927,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -954,7 +956,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -987,7 +989,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1018,7 +1020,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1042,7 +1044,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1082,7 +1084,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1225,8 +1227,8 @@ def __init__( network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1328,8 +1330,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1386,8 +1388,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1420,7 +1427,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "config": {"key": "config", "type": "{str}"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1569,8 +1576,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1823,8 +1830,8 @@ def __init__( scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1954,8 +1961,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -1996,7 +2003,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2030,7 +2037,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] @@ -2078,8 +2085,8 @@ def __init__( outbound_ip_prefixes: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPs"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2119,7 +2126,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2141,7 +2148,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2162,7 +2171,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] @@ -2207,8 +2216,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2242,7 +2251,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2255,7 +2266,8 @@ def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Opti class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2274,7 +2286,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -2329,8 +2341,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -2380,7 +2392,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -2421,7 +2433,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2464,7 +2476,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -2486,7 +2498,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -2506,7 +2518,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_agent_pools_operations.py index 0d52b5579de6..ed6921724c3d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_managed_clusters_operations.py index b112fd97bda7..607cda3b6f81 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_01/operations/_managed_clusters_operations.py @@ -1302,7 +1302,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1520,7 +1520,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1852,7 +1852,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2069,7 +2069,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_container_service_client.py index 1709a78ca52c..29f71cf71f92 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_container_service_client.py @@ -91,5 +91,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_metadata.json index 66e538da9ba9..1f14ffb544bc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/_container_service_client.py index ff3f6abb5f0d..4eaa3694a010 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/_container_service_client.py @@ -91,5 +91,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/operations/_open_shift_managed_clusters_operations.py index 492661b228f8..2fd9be3cf11c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/operations/_open_shift_managed_clusters_operations.py @@ -483,7 +483,7 @@ async def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_27_preview.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -708,7 +708,7 @@ async def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_27_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/models/_models_py3.py index 0ed93f896078..41b4b6192e81 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -46,8 +46,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -93,8 +93,8 @@ def __init__( vnet_cidr: str = "10.0.0.0/8", management_subnet_cidr: Optional[str] = None, vnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vnet_cidr: CIDR for the OpenShift Vnet. :paramtype vnet_cidr: str @@ -121,7 +121,7 @@ class OpenShiftAPIProperties(_serialization.Model): "private_api_server": {"key": "privateApiServer", "type": "bool"}, } - def __init__(self, *, private_api_server: Optional[bool] = None, **kwargs): + def __init__(self, *, private_api_server: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword private_api_server: Specifies if API server is public or private. :paramtype private_api_server: bool @@ -164,7 +164,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -283,8 +283,8 @@ def __init__( auth_profile: Optional["_models.OpenShiftManagedClusterAuthProfile"] = None, monitor_profile: Optional["_models.OpenShiftManagedClusterMonitorProfile"] = None, refresh_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -353,7 +353,7 @@ class OpenShiftManagedClusterBaseIdentityProvider(_serialization.Model): _subtype_map = {"kind": {"AADIdentityProvider": "OpenShiftManagedClusterAADIdentityProvider"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kind: Optional[str] = None @@ -395,8 +395,8 @@ def __init__( secret: Optional[str] = None, tenant_id: Optional[str] = None, customer_admin_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_id: The clientId password associated with the provider. :paramtype client_id: str @@ -469,8 +469,8 @@ def __init__( subnet_cidr: str = "10.0.0.0/24", os_type: Union[str, "_models.OSType"] = "Linux", role: Optional[Union[str, "_models.OpenShiftAgentPoolProfileRole"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Unique name of the pool profile in the context of the subscription and resource group. Required. @@ -519,8 +519,11 @@ class OpenShiftManagedClusterAuthProfile(_serialization.Model): } def __init__( - self, *, identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, **kwargs - ): + self, + *, + identity_providers: Optional[List["_models.OpenShiftManagedClusterIdentityProvider"]] = None, + **kwargs: Any + ) -> None: """ :keyword identity_providers: Type of authentication profile to use. :paramtype identity_providers: @@ -550,8 +553,8 @@ def __init__( *, name: Optional[str] = None, provider: Optional["_models.OpenShiftManagedClusterBaseIdentityProvider"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the provider. :paramtype name: str @@ -585,7 +588,7 @@ class OpenShiftManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of OpenShift managed clusters. :paramtype value: @@ -640,8 +643,8 @@ def __init__( vm_size: Union[str, "_models.OpenShiftContainerServiceVMSize"], subnet_cidr: Optional[str] = None, api_properties: Optional["_models.OpenShiftAPIProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) to host docker containers. The default value is 3. Required. @@ -684,7 +687,9 @@ class OpenShiftManagedClusterMonitorProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, workspace_resource_id: Optional[str] = None, enabled: Optional[bool] = None, **kwargs): + def __init__( + self, *, workspace_resource_id: Optional[str] = None, enabled: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword workspace_resource_id: Azure Resource Manager Resource ID for the Log Analytics workspace to integrate with. @@ -721,7 +726,7 @@ class OpenShiftRouterProfile(_serialization.Model): "fqdn": {"key": "fqdn", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Name of the router profile. :paramtype name: str @@ -760,8 +765,8 @@ def __init__( product: Optional[str] = None, promotion_code: Optional[str] = None, publisher: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The plan ID. :paramtype name: str @@ -791,7 +796,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/operations/_open_shift_managed_clusters_operations.py index ef4f0f634cd4..884e8438c404 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/operations/_open_shift_managed_clusters_operations.py @@ -672,7 +672,7 @@ def begin_create_or_update( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update an OpenShift Managed Cluster - operation. Is either a model type or a IO type. Required. + operation. Is either a OpenShiftManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_27_preview.models.OpenShiftManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -897,7 +897,7 @@ def begin_update_tags( :param resource_name: The name of the OpenShift managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update OpenShift Managed Cluster Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_10_27_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_container_service_client.py index 7f6dc7fb7f0c..622de9cf8596 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_metadata.json index ae9f4159d247..8f1591f00979 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/_container_service_client.py index 6727b34a1a42..a3aa39f12fed 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_agent_pools_operations.py index d70b52180e12..2ada1e20c5a6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_managed_clusters_operations.py index 3627b05e1354..e699c36ee623 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/aio/operations/_managed_clusters_operations.py @@ -796,7 +796,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1014,7 +1014,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1346,7 +1346,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1563,7 +1563,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/models/_models_py3.py index 7084264cd93a..2989102f17ff 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -209,8 +209,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -359,8 +359,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -396,8 +396,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -432,7 +432,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2019_11_01.models.AgentPool] @@ -488,8 +488,8 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -523,7 +523,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -565,8 +567,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -605,7 +607,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -636,7 +638,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -747,8 +749,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -886,8 +888,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -948,7 +950,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -977,7 +979,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1010,7 +1012,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1041,7 +1043,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1065,7 +1067,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1105,7 +1107,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1256,8 +1258,8 @@ def __init__( # pylint: disable=too-many-locals aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1363,8 +1365,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1421,8 +1423,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1462,7 +1469,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1498,8 +1505,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1537,8 +1544,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1695,8 +1702,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1963,8 +1970,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2100,8 +2107,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2142,7 +2149,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2176,7 +2183,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2019_11_01.models.ManagedCluster] @@ -2240,8 +2247,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2290,7 +2297,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2312,7 +2319,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2333,7 +2342,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2019_11_01.models.ResourceReference] @@ -2378,8 +2387,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2413,7 +2422,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2448,8 +2459,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2462,7 +2473,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2481,7 +2493,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -2536,8 +2548,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -2587,7 +2599,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -2628,7 +2640,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2671,7 +2683,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -2693,7 +2705,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -2713,7 +2725,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_agent_pools_operations.py index a47ce09bae1b..0f038893a199 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_managed_clusters_operations.py index 27499284e245..db85bea486f6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/operations/_managed_clusters_operations.py @@ -1302,7 +1302,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1520,7 +1520,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1852,7 +1852,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2069,7 +2069,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2019_11_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_container_service_client.py index 6c2c578808ab..8e24eb8b80fe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_metadata.json index 14f593a24c10..3bb5d9aeff73 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/_container_service_client.py index c6811e14effb..78aef70f8327 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_agent_pools_operations.py index 9203f24d625b..b606562885aa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_managed_clusters_operations.py index b6bbe43d7c0e..68d880296c35 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/aio/operations/_managed_clusters_operations.py @@ -796,7 +796,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1014,7 +1014,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1346,7 +1346,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1563,7 +1563,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/models/_models_py3.py index aca284963b06..1fbe81b73561 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -209,8 +209,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -359,8 +359,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -396,8 +396,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -432,7 +432,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPool] @@ -488,8 +488,8 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -523,7 +523,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -565,8 +567,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -605,7 +607,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -636,7 +638,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -747,8 +749,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -886,8 +888,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -948,7 +950,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -977,7 +979,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1010,7 +1012,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1041,7 +1043,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1065,7 +1067,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1105,7 +1107,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1261,8 +1263,8 @@ def __init__( # pylint: disable=too-many-locals api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, disk_encryption_set_id: Optional[str] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1372,8 +1374,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1430,8 +1432,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1471,7 +1478,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1507,8 +1514,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1546,8 +1553,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1704,8 +1711,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -1972,8 +1979,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2109,8 +2116,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2151,7 +2158,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2185,7 +2192,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] @@ -2249,8 +2256,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2299,7 +2306,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2321,7 +2328,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2342,7 +2351,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] @@ -2387,8 +2396,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2422,7 +2431,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2457,8 +2468,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2471,7 +2482,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2490,7 +2502,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -2545,8 +2557,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -2596,7 +2608,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -2637,7 +2649,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2680,7 +2692,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -2702,7 +2714,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -2722,7 +2734,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_agent_pools_operations.py index b7b74b6ddb93..375faaf40a64 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_managed_clusters_operations.py index 27a676bfbdf6..2f3247b899f5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_01_01/operations/_managed_clusters_operations.py @@ -1302,7 +1302,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1520,7 +1520,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1852,7 +1852,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2069,7 +2069,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_container_service_client.py index 6746dd69a8db..e317871bf1c0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_metadata.json index 05917d26181d..6fb6b3c4e47d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/_container_service_client.py index 6f3b7901df1d..94418f4d0423 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_agent_pools_operations.py index 60f7af31bdb1..281f93cdf4e4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_managed_clusters_operations.py index 8850ef3107f9..2c63e4b1fa55 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/aio/operations/_managed_clusters_operations.py @@ -796,7 +796,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1014,7 +1014,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1346,7 +1346,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1563,7 +1563,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/models/_models_py3.py index 773e3ab40089..30f1e962ab7f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -215,8 +215,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -370,8 +370,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -407,8 +407,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -443,7 +443,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPool] @@ -499,8 +499,8 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -534,7 +534,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -576,8 +578,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -616,7 +618,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -647,7 +649,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -758,8 +760,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -902,8 +904,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -968,7 +970,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -997,7 +999,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1030,7 +1032,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1061,7 +1063,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1085,7 +1087,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1125,7 +1127,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1289,8 +1291,8 @@ def __init__( # pylint: disable=too-many-locals api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, disk_encryption_set_id: Optional[str] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1404,8 +1406,8 @@ def __init__( server_app_id: str, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_app_id: The client AAD application ID. Required. :paramtype client_app_id: str @@ -1462,8 +1464,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1503,7 +1510,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1539,8 +1546,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1578,8 +1585,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1742,8 +1749,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2021,8 +2028,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2163,8 +2170,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2205,7 +2212,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2239,7 +2246,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] @@ -2303,8 +2310,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2353,7 +2360,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2375,7 +2382,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2396,7 +2405,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] @@ -2441,8 +2450,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2476,7 +2485,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2531,8 +2542,8 @@ def __init__( scale_down_unready_time: Optional[str] = None, scale_down_utilization_threshold: Optional[str] = None, max_graceful_termination_sec: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scan_interval: :paramtype scan_interval: str @@ -2585,8 +2596,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2599,7 +2610,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2618,7 +2630,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -2673,8 +2685,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -2724,7 +2736,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -2765,7 +2777,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2808,7 +2820,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -2830,7 +2842,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -2850,7 +2862,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_agent_pools_operations.py index 6149023d2f44..69c914bf25e6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_managed_clusters_operations.py index 0d482f5170fc..6629c7cc24cf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_managed_clusters_operations.py @@ -1302,7 +1302,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1520,7 +1520,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1852,7 +1852,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2069,7 +2069,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py index 6f2a0a8bd38d..a5b66bdc3ae3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json index e61b21e94c3a..ff49206877d6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py index c827e05ba28b..e58c7a3c97a0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py index c233a20be936..ed82e2100551 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py index 3a523a8e0247..bdfa140c347d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py @@ -796,7 +796,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1014,7 +1014,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1346,7 +1346,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1563,7 +1563,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py index fb98d1e2232f..03172ba6c4c7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -221,8 +221,8 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -381,8 +381,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -418,8 +418,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -454,7 +454,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPool] @@ -510,8 +510,8 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -545,7 +545,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -683,8 +685,8 @@ def __init__( api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, disk_encryption_set_id: Optional[str] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterIdentity @@ -789,8 +791,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -829,7 +831,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -860,7 +862,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -971,8 +973,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1115,8 +1117,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1181,7 +1183,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1210,7 +1212,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1243,7 +1245,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1274,7 +1276,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1298,7 +1300,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1338,7 +1340,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1506,8 +1508,8 @@ def __init__( # pylint: disable=too-many-locals identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterIdentity @@ -1651,8 +1653,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -1716,8 +1718,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1757,7 +1764,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1793,8 +1800,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1832,8 +1839,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2002,8 +2009,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2292,8 +2299,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2439,8 +2446,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2481,7 +2488,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2515,7 +2522,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] @@ -2579,8 +2586,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2629,7 +2636,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2651,7 +2658,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2672,7 +2681,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] @@ -2717,8 +2726,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2752,7 +2761,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2811,8 +2822,8 @@ def __init__( scale_down_unready_time: Optional[str] = None, scale_down_utilization_threshold: Optional[str] = None, max_graceful_termination_sec: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -2868,8 +2879,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2882,7 +2893,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2901,7 +2913,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -2932,8 +2944,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUName @@ -2988,8 +3000,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -3039,7 +3051,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -3080,7 +3092,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3123,7 +3135,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -3145,7 +3157,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -3165,7 +3177,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py index fcbd21695355..6d3c2836de34 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py index f64bc9986a49..f3824da84f3d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py @@ -1302,7 +1302,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1520,7 +1520,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1852,7 +1852,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2069,7 +2069,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_container_service_client.py index d62b906df5a1..503bdcc9dc08 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_container_service_client.py @@ -97,5 +97,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_metadata.json index 8dff4769e098..a4bce852384c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/_container_service_client.py index 04b6b2685bf8..697ecb5c0606 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/_container_service_client.py @@ -98,5 +98,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_agent_pools_operations.py index 2ecfebf18e8c..a8e3599ced43 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_managed_clusters_operations.py index d3b3a74b68f8..b03e70361d0a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/aio/operations/_managed_clusters_operations.py @@ -800,7 +800,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1018,7 +1018,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1350,7 +1350,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1567,7 +1567,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/models/_models_py3.py index 834ad4d9fc91..1dca6fe8820a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -230,8 +230,8 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -397,8 +397,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -434,8 +434,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -470,7 +470,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPool] @@ -531,8 +531,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -570,7 +570,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -594,7 +596,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -730,8 +732,8 @@ def __init__( api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, disk_encryption_set_id: Optional[str] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterIdentity @@ -836,8 +838,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -876,7 +878,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -907,7 +909,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1018,8 +1020,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1162,8 +1164,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1228,7 +1230,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1257,7 +1259,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1290,7 +1292,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1321,7 +1323,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1345,7 +1347,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1385,7 +1387,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1553,8 +1555,8 @@ def __init__( # pylint: disable=too-many-locals identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterIdentity @@ -1698,8 +1700,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -1763,8 +1765,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1804,7 +1811,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1840,8 +1847,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1879,8 +1886,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2058,8 +2065,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2364,8 +2371,8 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[Dict[str, str]] = None, node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2518,8 +2525,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2560,7 +2567,7 @@ class ManagedClusterIdentity(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs): + def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, **kwargs: Any) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2594,7 +2601,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] @@ -2658,8 +2665,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2708,7 +2715,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2730,7 +2737,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2751,7 +2760,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] @@ -2796,8 +2805,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2831,7 +2840,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2890,8 +2901,8 @@ def __init__( scale_down_unready_time: Optional[str] = None, scale_down_utilization_threshold: Optional[str] = None, max_graceful_termination_sec: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -2947,8 +2958,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2961,7 +2972,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -2980,7 +2992,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3011,8 +3023,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUName @@ -3067,8 +3079,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -3118,7 +3130,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -3159,7 +3171,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3202,7 +3214,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -3224,7 +3236,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -3244,7 +3256,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_agent_pools_operations.py index d83b7301d5ed..f8d43c45ef5e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_managed_clusters_operations.py index 56cc2d4d3538..23a0c10400be 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_04_01/operations/_managed_clusters_operations.py @@ -1306,7 +1306,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1524,7 +1524,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1856,7 +1856,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2073,7 +2073,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_container_service_client.py index 089f278b6fb2..87c222acaff3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_container_service_client.py @@ -108,5 +108,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_metadata.json index aa0a6b3b3381..67151b16b8ee 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/_container_service_client.py index 4dba4a670a97..b4ed69f718f1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/_container_service_client.py @@ -109,5 +109,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_agent_pools_operations.py index d384c6299262..a85277944230 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_agent_pools_operations.py @@ -401,7 +401,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_managed_clusters_operations.py index d14b8e351a33..aa7f8699c61a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_managed_clusters_operations.py @@ -800,7 +800,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1018,7 +1018,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1350,7 +1350,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1567,7 +1567,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_private_endpoint_connections_operations.py index aec7a42a882a..6ef8feed8fbe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/aio/operations/_private_endpoint_connections_operations.py @@ -280,7 +280,7 @@ async def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/models/_models_py3.py index 15c9640933e3..811b6cbd5f2f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -234,8 +234,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -404,8 +404,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -441,8 +441,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -477,7 +477,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPool] @@ -538,8 +538,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -577,7 +577,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -601,7 +603,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -737,8 +739,8 @@ def __init__( api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, disk_encryption_set_id: Optional[str] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentity @@ -843,8 +845,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -883,7 +885,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -914,7 +916,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1025,8 +1027,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1169,8 +1171,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1235,7 +1237,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1264,7 +1266,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1297,7 +1299,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1328,7 +1330,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1352,7 +1354,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1392,7 +1394,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1560,8 +1562,8 @@ def __init__( # pylint: disable=too-many-locals identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentity @@ -1709,8 +1711,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -1777,8 +1779,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1818,7 +1825,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1854,8 +1861,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1893,8 +1900,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2076,8 +2083,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2389,8 +2396,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2546,8 +2553,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2606,8 +2613,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedClusterIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2650,7 +2657,7 @@ class ManagedClusterIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -2677,7 +2684,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] @@ -2741,8 +2748,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2791,7 +2798,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2813,7 +2820,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2834,7 +2843,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] @@ -2879,8 +2888,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2914,7 +2923,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2973,8 +2984,8 @@ def __init__( scale_down_unready_time: Optional[str] = None, scale_down_utilization_threshold: Optional[str] = None, max_graceful_termination_sec: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -3030,8 +3041,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -3044,7 +3055,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -3063,7 +3075,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3094,8 +3106,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUName @@ -3150,8 +3162,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -3201,7 +3213,7 @@ class ManagedClusterWindowsProfile(_serialization.Model): "admin_password": {"key": "adminPassword", "type": "str"}, } - def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs): + def __init__(self, *, admin_username: str, admin_password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -3242,7 +3254,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3285,7 +3297,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -3307,7 +3319,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource Id for private endpoint. :paramtype id: str @@ -3363,8 +3375,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpoint @@ -3393,7 +3405,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -3423,8 +3435,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -3448,7 +3460,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -3468,7 +3480,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_agent_pools_operations.py index f4ee347f6439..dce7d016eedb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_agent_pools_operations.py @@ -628,7 +628,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_managed_clusters_operations.py index 887438edc18f..c9ad0835e4ef 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_managed_clusters_operations.py @@ -1306,7 +1306,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1524,7 +1524,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1856,7 +1856,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2073,7 +2073,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_private_endpoint_connections_operations.py index e70b2019f2fe..57f4f4f87fe8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_private_endpoint_connections_operations.py @@ -454,7 +454,7 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_container_service_client.py index 35f75e838b17..b6977653ee1e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_container_service_client.py @@ -108,5 +108,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_metadata.json index 57071d86bcd9..41ba28b36da9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/_container_service_client.py index 90c9f52c822d..052380968da9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/_container_service_client.py @@ -109,5 +109,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_agent_pools_operations.py index c95a19abd277..cbef0435f836 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_agent_pools_operations.py @@ -402,7 +402,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -775,7 +775,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_managed_clusters_operations.py index d58c264a8be4..23fbddc99225 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_managed_clusters_operations.py @@ -800,7 +800,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1018,7 +1018,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1350,7 +1350,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1567,7 +1567,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_private_endpoint_connections_operations.py index a159b8bf7417..59fa0f109c42 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/operations/_private_endpoint_connections_operations.py @@ -280,7 +280,7 @@ async def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/models/_models_py3.py index bac3408bef54..79d77ca19941 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -234,8 +234,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -402,8 +402,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -439,8 +439,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -475,7 +475,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_07_01.models.AgentPool] @@ -536,8 +536,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -575,7 +575,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -599,7 +601,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -735,8 +737,8 @@ def __init__( api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, disk_encryption_set_id: Optional[str] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedClusterIdentity @@ -841,8 +843,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -881,7 +883,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -912,7 +914,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1023,8 +1025,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1167,8 +1169,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1233,7 +1235,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1262,7 +1264,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1295,7 +1297,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1326,7 +1328,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1350,7 +1352,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1390,7 +1392,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1558,8 +1560,8 @@ def __init__( # pylint: disable=too-many-locals identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedClusterIdentity @@ -1707,8 +1709,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -1775,8 +1777,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1816,7 +1823,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1852,8 +1859,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1891,8 +1898,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2074,8 +2081,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2385,8 +2392,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2539,8 +2546,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2599,8 +2606,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedClusterIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2643,7 +2650,7 @@ class ManagedClusterIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -2670,7 +2677,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_07_01.models.ManagedCluster] @@ -2734,8 +2741,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2784,7 +2791,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2806,7 +2813,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2827,7 +2836,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_07_01.models.ResourceReference] @@ -2872,8 +2881,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2907,7 +2916,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -2966,8 +2977,8 @@ def __init__( scale_down_unready_time: Optional[str] = None, scale_down_utilization_threshold: Optional[str] = None, max_graceful_termination_sec: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -3023,8 +3034,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -3037,7 +3048,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -3056,7 +3068,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3087,8 +3099,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2020_07_01.models.ManagedClusterSKUName @@ -3143,8 +3155,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -3204,8 +3216,8 @@ def __init__( admin_username: str, admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -3250,7 +3262,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3293,7 +3305,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -3315,7 +3327,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource Id for private endpoint. :paramtype id: str @@ -3371,8 +3383,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2020_07_01.models.PrivateEndpoint @@ -3401,7 +3413,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -3431,8 +3443,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -3456,7 +3468,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -3476,7 +3488,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_agent_pools_operations.py index a20123a9adde..7402a3b9a4b7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_agent_pools_operations.py @@ -667,7 +667,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1039,7 +1039,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_managed_clusters_operations.py index 9eb237146009..1916a23c087f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_managed_clusters_operations.py @@ -1306,7 +1306,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1524,7 +1524,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1856,7 +1856,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2073,7 +2073,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_private_endpoint_connections_operations.py index 0c8dd8db1e8c..7d2d3148a82a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/operations/_private_endpoint_connections_operations.py @@ -454,7 +454,7 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_07_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_container_service_client.py index d39e9736df19..1ce8bf6f1f94 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_container_service_client.py @@ -122,5 +122,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_metadata.json index 3a65bee769cb..c7def4998669 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/_container_service_client.py index dab37979280e..627040484a30 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/_container_service_client.py @@ -123,5 +123,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_agent_pools_operations.py index 8d21684f82c7..bc50ee7a9075 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_agent_pools_operations.py @@ -402,7 +402,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -775,7 +775,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_managed_clusters_operations.py index df767eda0b9d..5a5b34dfe9a1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_managed_clusters_operations.py @@ -802,7 +802,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1020,7 +1020,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1352,7 +1352,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1569,7 +1569,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_private_endpoint_connections_operations.py index 1f8a76c7fd50..1e2649317367 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_private_endpoint_connections_operations.py @@ -280,7 +280,7 @@ async def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_resolve_private_link_service_id_operations.py index 6d8fe5b749a1..03f244897431 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -132,7 +132,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/models/_models_py3.py index 16d108b2b88b..9253dd6010fa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -244,8 +244,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -418,8 +418,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -455,8 +455,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -491,7 +491,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool] @@ -552,8 +552,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -591,7 +591,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -615,7 +617,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -755,8 +757,8 @@ def __init__( api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, disk_encryption_set_id: Optional[str] = None, identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentity @@ -862,8 +864,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -902,7 +904,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -933,7 +935,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1044,8 +1046,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1188,8 +1190,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1254,7 +1256,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1283,7 +1285,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1316,7 +1318,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1347,7 +1349,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1371,7 +1373,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1411,7 +1413,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1583,8 +1585,8 @@ def __init__( # pylint: disable=too-many-locals identity_profile: Optional[Dict[str, "_models.ManagedClusterPropertiesIdentityProfileValue"]] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentity @@ -1733,8 +1735,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -1801,8 +1803,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1842,7 +1849,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -1878,8 +1885,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1917,8 +1924,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2110,8 +2117,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2437,8 +2444,8 @@ def __init__( # pylint: disable=too-many-locals node_labels: Optional[Dict[str, str]] = None, node_taints: Optional[List[str]] = None, proximity_placement_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2596,8 +2603,8 @@ def __init__( *, authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2656,8 +2663,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedClusterIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -2700,7 +2707,7 @@ class ManagedClusterIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -2727,7 +2734,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] @@ -2791,8 +2798,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -2841,7 +2848,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -2863,7 +2870,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -2884,7 +2893,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] @@ -2929,8 +2938,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -2964,7 +2973,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -3051,8 +3062,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -3129,8 +3140,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -3143,7 +3154,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -3162,7 +3174,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3193,8 +3205,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUName @@ -3249,8 +3261,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -3310,8 +3322,8 @@ def __init__( admin_username: str, admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -3356,7 +3368,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3399,7 +3411,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -3422,7 +3434,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -3443,7 +3455,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource Id for private endpoint. :paramtype id: str @@ -3499,8 +3511,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpoint @@ -3529,7 +3541,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -3580,8 +3592,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -3614,7 +3626,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource] @@ -3643,8 +3655,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -3668,7 +3680,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -3688,7 +3700,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_agent_pools_operations.py index 7927b7ebe358..3dd7dcafdd37 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_agent_pools_operations.py @@ -667,7 +667,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1039,7 +1039,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_managed_clusters_operations.py index 67aa5ae7b599..f8d4fe1cfb11 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_managed_clusters_operations.py @@ -1382,7 +1382,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1600,7 +1600,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1932,7 +1932,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2149,7 +2149,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_private_endpoint_connections_operations.py index 236acb5498c7..d4fc3f56a6b0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_private_endpoint_connections_operations.py @@ -454,7 +454,7 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_resolve_private_link_service_id_operations.py index 98d98132e8e2..6d405899d1a8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_resolve_private_link_service_id_operations.py @@ -176,7 +176,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py index caa24ccbbc9e..212930c5559c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py @@ -122,5 +122,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json index 6b4506e799d4..83c4bd3da8a2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py index 3294191d5f72..5705622fc1ca 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py @@ -123,5 +123,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py index 888bfc12d935..659caf71a678 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py @@ -402,7 +402,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -775,7 +775,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py index dd362b6d0828..492588cf6aa4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py @@ -802,7 +802,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1020,7 +1020,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1352,7 +1352,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1569,7 +1569,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py index 8a7a1fedd05c..1daa9b1e3283 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py @@ -280,7 +280,7 @@ async def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py index 3a4891fc0208..0a508a21e951 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -132,7 +132,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py index 04aff302cea4..a2985d94bad6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -42,7 +42,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -258,8 +258,8 @@ def __init__( # pylint: disable=too-many-locals proximity_placement_group_id: Optional[str] = None, kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -444,8 +444,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -481,8 +481,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -517,7 +517,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] @@ -578,8 +578,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -617,7 +617,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -641,7 +643,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -662,7 +664,7 @@ class CloudError(_serialization.Model): "error": {"key": "error", "type": "CloudErrorBody"}, } - def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs: Any) -> None: """ :keyword error: Details about the error. :paramtype error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody @@ -701,8 +703,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -870,8 +872,8 @@ def __init__( # pylint: disable=too-many-locals "_models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity @@ -978,7 +980,7 @@ class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidenti "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -1008,8 +1010,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1049,8 +1051,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1080,7 +1082,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1111,7 +1113,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1222,8 +1224,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1366,8 +1368,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1432,7 +1434,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1461,7 +1463,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1494,7 +1496,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1525,7 +1527,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1549,7 +1551,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1602,8 +1604,8 @@ def __init__( topology_manager_policy: Optional[str] = None, allowed_unsafe_sysctls: Optional[List[str]] = None, fail_swap_on: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: CPU Manager policy to use. :paramtype cpu_manager_policy: str @@ -1666,8 +1668,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2020_11_01.models.SysctlConfig @@ -1720,7 +1722,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1909,8 +1911,8 @@ def __init__( # pylint: disable=too-many-locals ] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity @@ -2069,8 +2071,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2137,8 +2139,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2178,7 +2185,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2214,8 +2221,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2421,8 +2428,8 @@ def __init__( # pylint: disable=too-many-locals proximity_placement_group_id: Optional[str] = None, kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2774,8 +2781,8 @@ def __init__( # pylint: disable=too-many-locals proximity_placement_group_id: Optional[str] = None, kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2949,8 +2956,8 @@ def __init__( authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, private_dns_zone: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -2977,7 +2984,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: upgrade channel for auto upgrade. Known values are: "rapid", "stable", "patch", and "none". @@ -3038,8 +3047,8 @@ def __init__( "_models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -3081,7 +3090,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] @@ -3145,8 +3154,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3195,7 +3204,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -3217,7 +3226,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3238,7 +3249,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] @@ -3285,7 +3296,7 @@ class ManagedClusterPodIdentity(_serialization.Model): "provisioning_info": {"key": "provisioningInfo", "type": "ManagedClusterPodIdentityProvisioningInfo"}, } - def __init__(self, *, name: str, namespace: str, identity: "_models.UserAssignedIdentity", **kwargs): + def __init__(self, *, name: str, namespace: str, identity: "_models.UserAssignedIdentity", **kwargs: Any) -> None: """ :keyword name: Name of the pod identity. Required. :paramtype name: str @@ -3327,7 +3338,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: Name of the pod identity exception. Required. :paramtype name: str @@ -3370,8 +3381,8 @@ def __init__( enabled: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3399,7 +3410,7 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "CloudError"}, } - def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs: Any) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudError @@ -3444,8 +3455,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -3479,7 +3490,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -3566,8 +3579,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -3622,7 +3635,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -3641,7 +3655,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3672,8 +3686,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUName @@ -3728,8 +3742,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -3789,8 +3803,8 @@ def __init__( admin_username: str, admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -3835,7 +3849,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3878,7 +3892,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -3901,7 +3915,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -3922,7 +3936,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource Id for private endpoint. :paramtype id: str @@ -3978,8 +3992,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint @@ -4008,7 +4022,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4059,8 +4073,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4093,7 +4107,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource] @@ -4122,8 +4136,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4147,7 +4161,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4279,8 +4293,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -4381,7 +4395,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py index 6ff1233426f2..07d012d56e12 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py @@ -667,7 +667,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1039,7 +1039,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py index 91eabdba9446..3a56a295be3d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py @@ -1382,7 +1382,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1600,7 +1600,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1932,7 +1932,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2149,7 +2149,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py index 58041e43c83d..ef86ca7fe7a1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py @@ -454,7 +454,7 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py index 108c09411944..8463c79f8a6a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py @@ -176,7 +176,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_container_service_client.py index c92de60f3c8e..17d78e07d86f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_container_service_client.py @@ -129,5 +129,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_metadata.json index 21d3e2400c68..eca7c3880049 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/_container_service_client.py index 3b35d1e65968..d01876ac6f1d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/_container_service_client.py @@ -130,5 +130,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_agent_pools_operations.py index dee512724b3b..67f38b031ab2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_agent_pools_operations.py @@ -402,7 +402,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -775,7 +775,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_maintenance_configurations_operations.py index a80eddaf8006..3e4d3775b495 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_maintenance_configurations_operations.py @@ -310,7 +310,7 @@ async def create_or_update( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :param parameters: Parameters supplied to the Create or Update a default maintenance - configuration. Is either a model type or a IO type. Required. + configuration. Is either a MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_managed_clusters_operations.py index 35ed9b40d90a..a5c0742ece76 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_managed_clusters_operations.py @@ -802,7 +802,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1020,7 +1020,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1352,7 +1352,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1569,7 +1569,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py index b847b6a1bf87..fcd7e20d899b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py @@ -280,7 +280,7 @@ async def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py index 4fc25410cb7e..aff929fa446c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -132,7 +132,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/models/_models_py3.py index 0f1a788d5493..f80c0b392437 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -270,8 +270,8 @@ def __init__( # pylint: disable=too-many-locals kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, enable_encryption_at_host: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -465,8 +465,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -502,8 +502,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -538,7 +538,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] @@ -599,8 +599,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -638,7 +638,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -662,7 +664,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -683,7 +685,7 @@ class CloudError(_serialization.Model): "error": {"key": "error", "type": "CloudErrorBody"}, } - def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs: Any) -> None: """ :keyword error: Details about the error. :paramtype error: ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody @@ -722,8 +724,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -891,8 +893,8 @@ def __init__( # pylint: disable=too-many-locals "_models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity @@ -999,7 +1001,7 @@ class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidenti "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -1029,8 +1031,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1070,8 +1072,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1101,7 +1103,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1132,7 +1134,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1243,8 +1245,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1387,8 +1389,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1453,7 +1455,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1482,7 +1484,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1515,7 +1517,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1546,7 +1548,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1570,7 +1572,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1641,8 +1643,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: CPU Manager policy to use. :paramtype cpu_manager_policy: str @@ -1716,8 +1718,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig @@ -1777,8 +1779,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: Weekday time slots allowed to upgrade. :paramtype time_in_week: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] @@ -1811,7 +1813,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1856,7 +1858,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2045,8 +2047,8 @@ def __init__( # pylint: disable=too-many-locals ] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity @@ -2205,8 +2207,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2273,8 +2275,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2314,7 +2321,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2350,8 +2357,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2568,8 +2575,8 @@ def __init__( # pylint: disable=too-many-locals kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, enable_encryption_at_host: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2941,8 +2948,8 @@ def __init__( # pylint: disable=too-many-locals kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, enable_encryption_at_host: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -3125,8 +3132,8 @@ def __init__( authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, private_dns_zone: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -3153,7 +3160,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: upgrade channel for auto upgrade. Known values are: "rapid", "stable", "patch", and "none". @@ -3214,8 +3223,8 @@ def __init__( "_models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -3257,7 +3266,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] @@ -3321,8 +3330,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3371,7 +3380,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -3393,7 +3402,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3414,7 +3425,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] @@ -3461,7 +3472,7 @@ class ManagedClusterPodIdentity(_serialization.Model): "provisioning_info": {"key": "provisioningInfo", "type": "ManagedClusterPodIdentityProvisioningInfo"}, } - def __init__(self, *, name: str, namespace: str, identity: "_models.UserAssignedIdentity", **kwargs): + def __init__(self, *, name: str, namespace: str, identity: "_models.UserAssignedIdentity", **kwargs: Any) -> None: """ :keyword name: Name of the pod identity. Required. :paramtype name: str @@ -3503,7 +3514,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: Name of the pod identity exception. Required. :paramtype name: str @@ -3546,8 +3557,8 @@ def __init__( enabled: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3575,7 +3586,7 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "CloudError"}, } - def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs: Any) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: ~azure.mgmt.containerservice.v2020_12_01.models.CloudError @@ -3620,8 +3631,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -3655,7 +3666,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -3746,8 +3759,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -3805,7 +3818,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -3824,7 +3838,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3855,8 +3869,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName @@ -3911,8 +3925,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -3972,8 +3986,8 @@ def __init__( admin_username: str, admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4018,7 +4032,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4061,7 +4075,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4084,7 +4098,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4105,7 +4119,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource Id for private endpoint. :paramtype id: str @@ -4161,8 +4175,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint @@ -4191,7 +4205,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4242,8 +4256,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4276,7 +4290,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] @@ -4305,8 +4319,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4330,7 +4344,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4462,8 +4476,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -4591,8 +4605,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -4631,7 +4645,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -4656,8 +4670,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: A day in a week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -4684,7 +4702,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_agent_pools_operations.py index 18f5c3c11d44..76980fba79ff 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_agent_pools_operations.py @@ -667,7 +667,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1039,7 +1039,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_maintenance_configurations_operations.py index a8f3e0c9d1b9..4589d6b3fb2d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_maintenance_configurations_operations.py @@ -465,7 +465,7 @@ def create_or_update( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :param parameters: Parameters supplied to the Create or Update a default maintenance - configuration. Is either a model type or a IO type. Required. + configuration. Is either a MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_managed_clusters_operations.py index b2960f002797..24bae2aa7e33 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_managed_clusters_operations.py @@ -1382,7 +1382,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1600,7 +1600,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1932,7 +1932,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2149,7 +2149,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_private_endpoint_connections_operations.py index e2ac63f6488c..cb424709fe04 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_private_endpoint_connections_operations.py @@ -454,7 +454,7 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_resolve_private_link_service_id_operations.py index b7b02ebb1465..c027d4458933 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_resolve_private_link_service_id_operations.py @@ -176,7 +176,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_container_service_client.py index 3f90b956a162..8aa21b2978d0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_container_service_client.py @@ -129,5 +129,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_metadata.json index e566b09fe02c..00694cc96f83 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/_container_service_client.py index be1f0ea878c3..d202231ab115 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/_container_service_client.py @@ -130,5 +130,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_agent_pools_operations.py index 6ac46d6c5aa1..225c8477b8f1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_agent_pools_operations.py @@ -402,7 +402,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -775,7 +775,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_maintenance_configurations_operations.py index 3df5b244a00c..9803ab9f8ba1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_maintenance_configurations_operations.py @@ -310,7 +310,7 @@ async def create_or_update( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :param parameters: Parameters supplied to the Create or Update a default maintenance - configuration. Is either a model type or a IO type. Required. + configuration. Is either a MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_managed_clusters_operations.py index 43c7d6826689..f939d393aa59 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_managed_clusters_operations.py @@ -802,7 +802,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1020,7 +1020,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1352,7 +1352,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1569,7 +1569,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_private_endpoint_connections_operations.py index f36b52abf4bd..f0be7dcd5f4a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_private_endpoint_connections_operations.py @@ -280,7 +280,7 @@ async def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_resolve_private_link_service_id_operations.py index 7caa26fa0bcd..37ffd28591aa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -132,7 +132,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/models/_models_py3.py index a4bbaec58a19..4acd633658a5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -275,8 +275,8 @@ def __init__( # pylint: disable=too-many-locals kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, enable_encryption_at_host: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -474,8 +474,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -511,8 +511,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -547,7 +547,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool] @@ -608,8 +608,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -647,7 +647,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -671,7 +673,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -692,7 +694,7 @@ class CloudError(_serialization.Model): "error": {"key": "error", "type": "CloudErrorBody"}, } - def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs: Any) -> None: """ :keyword error: Details about the error. :paramtype error: ~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody @@ -731,8 +733,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -909,8 +911,8 @@ def __init__( # pylint: disable=too-many-locals "_models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentity @@ -1022,7 +1024,7 @@ class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidenti "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -1052,8 +1054,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1093,8 +1095,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1124,7 +1126,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1155,7 +1157,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1266,8 +1268,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1410,8 +1412,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1476,7 +1478,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1505,7 +1507,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1538,7 +1540,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1569,7 +1571,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1593,7 +1595,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1664,8 +1666,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: CPU Manager policy to use. :paramtype cpu_manager_policy: str @@ -1739,8 +1741,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_02_01.models.SysctlConfig @@ -1800,8 +1802,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: Weekday time slots allowed to upgrade. :paramtype time_in_week: list[~azure.mgmt.containerservice.v2021_02_01.models.TimeInWeek] @@ -1834,7 +1836,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1879,7 +1881,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2077,8 +2079,8 @@ def __init__( # pylint: disable=too-many-locals ] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentity @@ -2243,8 +2245,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2311,8 +2313,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2352,7 +2359,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2388,8 +2395,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2611,8 +2618,8 @@ def __init__( # pylint: disable=too-many-locals kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, enable_encryption_at_host: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2993,8 +3000,8 @@ def __init__( # pylint: disable=too-many-locals kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, enable_encryption_at_host: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -3181,8 +3188,8 @@ def __init__( authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, private_dns_zone: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -3209,7 +3216,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: upgrade channel for auto upgrade. Known values are: "rapid", "stable", "patch", and "none". @@ -3270,8 +3279,8 @@ def __init__( "_models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -3313,7 +3322,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] @@ -3377,8 +3386,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3427,7 +3436,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -3449,7 +3458,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3470,7 +3481,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] @@ -3517,7 +3528,7 @@ class ManagedClusterPodIdentity(_serialization.Model): "provisioning_info": {"key": "provisioningInfo", "type": "ManagedClusterPodIdentityProvisioningInfo"}, } - def __init__(self, *, name: str, namespace: str, identity: "_models.UserAssignedIdentity", **kwargs): + def __init__(self, *, name: str, namespace: str, identity: "_models.UserAssignedIdentity", **kwargs: Any) -> None: """ :keyword name: Name of the pod identity. Required. :paramtype name: str @@ -3559,7 +3570,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: Name of the pod identity exception. Required. :paramtype name: str @@ -3607,8 +3618,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3640,7 +3651,7 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "CloudError"}, } - def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs: Any) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: ~azure.mgmt.containerservice.v2021_02_01.models.CloudError @@ -3685,8 +3696,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -3720,7 +3731,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -3811,8 +3824,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -3870,7 +3883,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -3889,7 +3903,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3920,8 +3934,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUName @@ -3976,8 +3990,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4037,8 +4051,8 @@ def __init__( admin_username: str, admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4083,7 +4097,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4126,7 +4140,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4149,7 +4163,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4170,7 +4184,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource Id for private endpoint. :paramtype id: str @@ -4226,8 +4240,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpoint @@ -4256,7 +4270,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4307,8 +4321,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4341,7 +4355,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource] @@ -4370,8 +4384,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4395,7 +4409,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4527,8 +4541,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -4656,8 +4670,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -4696,7 +4710,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -4721,8 +4735,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: A day in a week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -4749,7 +4767,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_agent_pools_operations.py index b6beea89aa4d..95b62a156b55 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_agent_pools_operations.py @@ -667,7 +667,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1039,7 +1039,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_maintenance_configurations_operations.py index e817478c0846..840982910f59 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_maintenance_configurations_operations.py @@ -465,7 +465,7 @@ def create_or_update( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :param parameters: Parameters supplied to the Create or Update a default maintenance - configuration. Is either a model type or a IO type. Required. + configuration. Is either a MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_managed_clusters_operations.py index e7e3eaa0d871..6bfe911e98af 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_managed_clusters_operations.py @@ -1382,7 +1382,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1600,7 +1600,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1932,7 +1932,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2149,7 +2149,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_private_endpoint_connections_operations.py index 9b83fb9cb538..aa7e06a4f156 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_private_endpoint_connections_operations.py @@ -454,7 +454,7 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_resolve_private_link_service_id_operations.py index 9ea7215f8591..6c13eb52ee36 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_02_01/operations/_resolve_private_link_service_id_operations.py @@ -176,7 +176,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_container_service_client.py index d132925e1e9c..0cbb1cf8f514 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_container_service_client.py @@ -129,5 +129,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_metadata.json index 045c882d8439..d944035334c3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/_container_service_client.py index 1056e80d403d..878611266492 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/_container_service_client.py @@ -130,5 +130,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_agent_pools_operations.py index 1fe91a3cf775..50182b0afb3f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_agent_pools_operations.py @@ -402,7 +402,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -775,7 +775,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_maintenance_configurations_operations.py index 35eaae6b478f..31af796224e0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_maintenance_configurations_operations.py @@ -310,7 +310,7 @@ async def create_or_update( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :param parameters: Parameters supplied to the Create or Update a default maintenance - configuration. Is either a model type or a IO type. Required. + configuration. Is either a MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_managed_clusters_operations.py index 61f766f61901..8832a7c63d54 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_managed_clusters_operations.py @@ -870,7 +870,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1088,7 +1088,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1420,7 +1420,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1637,7 +1637,7 @@ async def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2199,8 +2199,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand operation. Is either a model type - or a IO type. Required. + :param request_payload: Parameters supplied to the RunCommand operation. Is either a + RunCommandRequest type or a IO type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_03_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_private_endpoint_connections_operations.py index fe6fa8380eff..d6e5f179b55f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_private_endpoint_connections_operations.py @@ -280,7 +280,7 @@ async def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_resolve_private_link_service_id_operations.py index 596e6f3bab95..ed140047fc7f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -132,7 +132,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/models/_models_py3.py index 876c6ae782dc..0b9cef1f3a18 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -254,8 +254,8 @@ def __init__( # pylint: disable=too-many-locals enable_encryption_at_host: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -429,8 +429,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -466,8 +466,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -502,7 +502,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool] @@ -563,8 +563,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -602,7 +602,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -626,7 +628,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. @@ -647,7 +649,7 @@ class CloudError(_serialization.Model): "error": {"key": "error", "type": "CloudErrorBody"}, } - def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudErrorBody"] = None, **kwargs: Any) -> None: """ :keyword error: Details about the error. :paramtype error: ~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody @@ -686,8 +688,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -879,8 +881,8 @@ def __init__( # pylint: disable=too-many-locals private_link_resources: Optional[List["_models.PrivateLinkResource"]] = None, disable_local_accounts: Optional[bool] = None, http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentity @@ -1005,7 +1007,7 @@ class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidenti "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -1035,8 +1037,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1076,8 +1078,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -1107,7 +1109,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1138,7 +1140,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1249,8 +1251,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1393,8 +1395,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building Kubernetes network. Known values are: "azure" and "kubenet". @@ -1459,7 +1461,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. Required. @@ -1488,7 +1490,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1521,7 +1523,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1552,7 +1554,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1576,7 +1578,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1601,8 +1603,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1679,8 +1681,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: CPU Manager policy to use. :paramtype cpu_manager_policy: str @@ -1754,8 +1756,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_03_01.models.SysctlConfig @@ -1815,8 +1817,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: Weekday time slots allowed to upgrade. :paramtype time_in_week: list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] @@ -1849,7 +1851,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1894,7 +1896,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2111,8 +2113,8 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, extended_location: Optional["_models.ExtendedLocation"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentity @@ -2296,8 +2298,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2364,8 +2366,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2405,7 +2412,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2441,8 +2448,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource id of the user assigned identity. :paramtype resource_id: str @@ -2643,8 +2650,8 @@ def __init__( # pylint: disable=too-many-locals enable_encryption_at_host: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -2980,8 +2987,8 @@ def __init__( # pylint: disable=too-many-locals enable_encryption_at_host: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for @@ -3144,8 +3151,8 @@ def __init__( authorized_ip_ranges: Optional[List[str]] = None, enable_private_cluster: Optional[bool] = None, private_dns_zone: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :paramtype authorized_ip_ranges: list[str] @@ -3172,7 +3179,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: upgrade channel for auto upgrade. Known values are: "rapid", "stable", "patch", "node-image", and "none". @@ -3210,8 +3219,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3279,8 +3288,8 @@ def __init__( "_models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned @@ -3322,7 +3331,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] @@ -3386,8 +3395,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3436,7 +3445,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. @@ -3458,7 +3467,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3479,7 +3490,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] @@ -3536,8 +3547,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the pod identity. Required. :paramtype name: str @@ -3582,7 +3593,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: Name of the pod identity exception. Required. :paramtype name: str @@ -3630,8 +3641,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3663,7 +3674,7 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "CloudError"}, } - def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.CloudError"] = None, **kwargs: Any) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: ~azure.mgmt.containerservice.v2021_03_01.models.CloudError @@ -3708,8 +3719,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). Required. :paramtype kubernetes_version: str @@ -3743,7 +3754,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: Kubernetes version (major, minor, patch). :paramtype kubernetes_version: str @@ -3834,8 +3847,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: :paramtype balance_similar_node_groups: str @@ -3893,7 +3906,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -3912,7 +3926,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -3943,8 +3957,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUName @@ -3999,8 +4013,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4064,8 +4078,8 @@ def __init__( admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4113,7 +4127,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4156,7 +4170,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4199,7 +4213,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS option properties. Required. :paramtype os_option_property_list: @@ -4233,7 +4247,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: OS type. Required. :paramtype os_type: str @@ -4257,7 +4271,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4278,7 +4292,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource Id for private endpoint. :paramtype id: str @@ -4334,8 +4348,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpoint @@ -4364,7 +4378,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4415,8 +4429,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4449,7 +4463,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] @@ -4478,8 +4492,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4503,7 +4517,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4535,7 +4549,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: command to run. Required. :paramtype command: str @@ -4591,7 +4607,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -4726,8 +4742,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -4855,8 +4871,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -4895,7 +4911,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -4920,8 +4936,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: A day in a week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -4948,7 +4968,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_agent_pools_operations.py index c6341b5e713e..a50d6d7ef6da 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_agent_pools_operations.py @@ -667,7 +667,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: Parameters supplied to the Create or Update an agent pool operation. Is - either a model type or a IO type. Required. + either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1039,7 +1039,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_maintenance_configurations_operations.py index a89239df0ceb..a577d42ddf33 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_maintenance_configurations_operations.py @@ -465,7 +465,7 @@ def create_or_update( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :param parameters: Parameters supplied to the Create or Update a default maintenance - configuration. Is either a model type or a IO type. Required. + configuration. Is either a MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_managed_clusters_operations.py index 94b6df606471..1a77c3756121 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_managed_clusters_operations.py @@ -1559,7 +1559,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. Is - either a model type or a IO type. Required. + either a ManagedCluster type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1777,7 +1777,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2109,7 +2109,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a - Managed Cluster. Is either a model type or a IO type. Required. + Managed Cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2326,7 +2326,7 @@ def begin_reset_aad_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed - Cluster. Is either a model type or a IO type. Required. + Cluster. Is either a ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2888,8 +2888,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand operation. Is either a model type - or a IO type. Required. + :param request_payload: Parameters supplied to the RunCommand operation. Is either a + RunCommandRequest type or a IO type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_03_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_private_endpoint_connections_operations.py index 8c6e152e8930..9bbeb2caf997 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_private_endpoint_connections_operations.py @@ -454,7 +454,7 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update a private endpoint connection operation. - Is either a model type or a IO type. Required. + Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_resolve_private_link_service_id_operations.py index 390eb29e9c00..49924f26044f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_03_01/operations/_resolve_private_link_service_id_operations.py @@ -176,7 +176,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters (name, groupId) supplied in order to resolve a private link - service ID. Is either a model type or a IO type. Required. + service ID. Is either a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_container_service_client.py index 84fd218cb75d..f748614d86ea 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_container_service_client.py @@ -129,5 +129,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_metadata.json index 5fba4cfe1f27..1cfca8000c9e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/_container_service_client.py index 48679f8af949..4de6d7247091 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/_container_service_client.py @@ -130,5 +130,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_agent_pools_operations.py index e3bdb54e0a46..47ada59991ea 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_agent_pools_operations.py @@ -398,7 +398,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -773,7 +773,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_maintenance_configurations_operations.py index 9d2f282080b0..c41f3bd81d13 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_maintenance_configurations_operations.py @@ -306,8 +306,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_managed_clusters_operations.py index 8857442cfba7..756cd9cb9ca0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_managed_clusters_operations.py @@ -868,8 +868,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1087,7 +1087,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1417,7 +1417,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1631,8 +1631,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2203,7 +2203,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py index 0348d3b6a072..9261d768a89f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py @@ -278,8 +278,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py index 56d65b684998..a49364bbcd75 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_container_service_client_enums.py index 5c76ee430fdb..addb4ee8876c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -303,10 +303,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -314,10 +314,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -326,12 +326,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -354,48 +354,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -405,14 +405,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -425,10 +425,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -436,15 +436,15 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -461,16 +461,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -479,22 +479,22 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -502,30 +502,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_models_py3.py index 6855295b182d..2e7821b3b7d0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -274,8 +274,8 @@ def __init__( # pylint: disable=too-many-locals enable_ultra_ssd: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -469,8 +469,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -506,8 +506,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -542,7 +542,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] @@ -602,8 +602,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -640,7 +640,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -667,7 +669,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -710,8 +712,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -911,8 +913,8 @@ def __init__( # pylint: disable=too-many-locals private_link_resources: Optional[List["_models.PrivateLinkResource"]] = None, disable_local_accounts: Optional[bool] = None, http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity @@ -1044,7 +1046,7 @@ class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidenti "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -1074,8 +1076,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -1115,8 +1117,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -1146,7 +1148,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1177,7 +1179,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1288,8 +1290,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1435,8 +1437,8 @@ def __init__( outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1504,7 +1506,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1533,7 +1535,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1566,7 +1568,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1597,7 +1599,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1621,7 +1623,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1646,8 +1648,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1687,8 +1689,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1725,8 +1727,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1739,7 +1741,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1809,8 +1812,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1862,7 +1865,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig @@ -1893,8 +1897,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig @@ -1918,7 +1922,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1959,8 +1964,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1994,7 +1999,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2039,7 +2044,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2264,8 +2269,8 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[Dict[str, str]] = None, sku: Optional["_models.ManagedClusterSKU"] = None, extended_location: Optional["_models.ExtendedLocation"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity @@ -2457,8 +2462,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2525,8 +2530,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2566,7 +2576,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2602,8 +2612,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2824,8 +2834,8 @@ def __init__( # pylint: disable=too-many-locals enable_ultra_ssd: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3200,8 +3210,8 @@ def __init__( # pylint: disable=too-many-locals enable_ultra_ssd: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3394,8 +3404,8 @@ def __init__( enable_private_cluster: Optional[bool] = None, private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3433,7 +3443,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3472,8 +3484,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3537,8 +3549,8 @@ def __init__( "_models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties", ] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3576,7 +3588,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] @@ -3640,8 +3652,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3690,7 +3702,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value @@ -3713,7 +3725,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3734,7 +3748,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] @@ -3791,8 +3805,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3813,7 +3827,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3837,7 +3853,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3853,7 +3869,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3888,8 +3905,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3925,7 +3942,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3966,8 +3985,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4001,7 +4020,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4047,8 +4068,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4082,7 +4103,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4184,8 +4207,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4255,7 +4278,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4274,7 +4298,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4307,8 +4331,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName @@ -4365,8 +4389,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4432,8 +4456,8 @@ def __init__( admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4483,7 +4507,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4526,7 +4550,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4569,7 +4593,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4603,7 +4627,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4635,8 +4659,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4673,7 +4697,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4696,7 +4720,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4717,7 +4741,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4773,8 +4797,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint @@ -4803,7 +4827,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4854,8 +4878,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4888,7 +4912,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] @@ -4917,8 +4941,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4942,7 +4966,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4974,7 +4998,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5030,7 +5056,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5165,8 +5191,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5294,8 +5320,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5334,7 +5360,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5361,8 +5387,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5391,7 +5421,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_agent_pools_operations.py index bf9cd3899fbe..d63894eeb21d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_agent_pools_operations.py @@ -663,7 +663,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1037,7 +1037,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_maintenance_configurations_operations.py index 02dfedc059b7..5cc1d28a9416 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_maintenance_configurations_operations.py @@ -461,8 +461,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_managed_clusters_operations.py index 8918aa44e1ac..1490cd7a2625 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_managed_clusters_operations.py @@ -1615,8 +1615,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1834,7 +1834,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2164,7 +2164,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2378,8 +2378,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2950,7 +2950,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_private_endpoint_connections_operations.py index 074130d40c59..07ff20a10dd4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_private_endpoint_connections_operations.py @@ -452,8 +452,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_resolve_private_link_service_id_operations.py index d910f6340699..19c25f712e4b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_05_01/operations/_resolve_private_link_service_id_operations.py @@ -174,7 +174,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_container_service_client.py index 62b7b96548a7..35a9ceb41c45 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_container_service_client.py @@ -129,5 +129,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_metadata.json index 8ad1559d9d0d..a61876268b4f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/_container_service_client.py index d926fbbcee8a..415adb96f7f1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/_container_service_client.py @@ -130,5 +130,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_agent_pools_operations.py index 5c598d1c9b71..72e6be871aa1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_agent_pools_operations.py @@ -398,7 +398,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -773,7 +773,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_maintenance_configurations_operations.py index 7ec768fe58ef..dddb07d6b70b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_maintenance_configurations_operations.py @@ -306,8 +306,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_managed_clusters_operations.py index f8c95de0c047..4fd1a0bc0ce5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_managed_clusters_operations.py @@ -868,8 +868,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1087,7 +1087,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1417,7 +1417,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1631,8 +1631,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2203,7 +2203,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_07_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_private_endpoint_connections_operations.py index ec35d7412dd9..5a6081b9ec1f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_private_endpoint_connections_operations.py @@ -278,8 +278,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_resolve_private_link_service_id_operations.py index 78f7bb2f647a..1f969d258470 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_container_service_client_enums.py index 92b87806051c..52cbab735c25 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -303,10 +303,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -314,10 +314,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -326,12 +326,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -354,48 +354,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -405,14 +405,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -425,10 +425,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -436,20 +436,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -466,16 +466,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -483,11 +483,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -496,22 +496,22 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -519,30 +519,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_models_py3.py index 4e3c6210f7bb..e88a4a537179 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -279,8 +279,8 @@ def __init__( # pylint: disable=too-many-locals enable_ultra_ssd: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -479,8 +479,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -516,8 +516,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -552,7 +552,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_07_01.models.AgentPool] @@ -612,8 +612,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -650,7 +650,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -677,7 +679,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -720,8 +722,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -760,7 +762,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -791,7 +793,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -902,8 +904,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1054,8 +1056,8 @@ def __init__( load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, nat_gateway_profile: Optional["_models.ManagedClusterNATGatewayProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1127,7 +1129,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1156,7 +1158,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1189,7 +1191,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1220,7 +1222,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1244,7 +1246,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1269,8 +1271,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1310,8 +1312,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1348,8 +1350,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1362,7 +1364,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1432,8 +1435,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1485,7 +1488,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2021_07_01.models.SysctlConfig @@ -1516,8 +1520,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_07_01.models.SysctlConfig @@ -1541,7 +1545,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1582,8 +1587,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1617,7 +1622,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1662,7 +1667,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1882,8 +1887,8 @@ def __init__( # pylint: disable=too-many-locals disable_local_accounts: Optional[bool] = None, http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2047,8 +2052,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2115,8 +2120,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2156,7 +2166,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2192,8 +2202,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2231,8 +2241,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2458,8 +2468,8 @@ def __init__( # pylint: disable=too-many-locals enable_ultra_ssd: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -2844,8 +2854,8 @@ def __init__( # pylint: disable=too-many-locals enable_ultra_ssd: Optional[bool] = None, enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3043,8 +3053,8 @@ def __init__( enable_private_cluster: Optional[bool] = None, private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3082,7 +3092,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3121,8 +3133,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3183,8 +3195,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3222,7 +3234,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_07_01.models.ManagedCluster] @@ -3286,8 +3298,8 @@ def __init__( effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3336,7 +3348,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value @@ -3359,7 +3371,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3380,7 +3394,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2021_07_01.models.ResourceReference] @@ -3405,7 +3419,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3449,8 +3463,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3518,8 +3532,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3540,7 +3554,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3564,7 +3580,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3580,7 +3596,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3615,8 +3632,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3652,7 +3669,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3693,8 +3712,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -3728,7 +3747,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -3774,8 +3795,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -3809,7 +3830,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -3911,8 +3934,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -3994,8 +4017,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4023,8 +4046,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4040,7 +4067,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4059,7 +4087,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4092,8 +4120,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2021_07_01.models.ManagedClusterSKUName @@ -4150,8 +4178,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4217,8 +4245,8 @@ def __init__( admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4272,7 +4300,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4296,7 +4324,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4339,7 +4367,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4382,7 +4410,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4416,7 +4444,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4448,8 +4476,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4486,7 +4514,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4509,7 +4537,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4530,7 +4558,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4586,8 +4614,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2021_07_01.models.PrivateEndpoint @@ -4616,7 +4644,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4667,8 +4695,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4701,7 +4729,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2021_07_01.models.PrivateLinkResource] @@ -4730,8 +4758,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4755,7 +4783,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4787,7 +4815,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -4843,7 +4873,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -4978,8 +5008,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5107,8 +5137,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5147,7 +5177,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5174,8 +5204,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5204,7 +5238,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_agent_pools_operations.py index 5606fcf5014d..1a6107a846e3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_agent_pools_operations.py @@ -663,7 +663,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1037,7 +1037,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_maintenance_configurations_operations.py index 27ecd267d4dd..4439fd8bbaf2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_maintenance_configurations_operations.py @@ -461,8 +461,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_managed_clusters_operations.py index ecbfbbe5e0e0..977d04939587 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_managed_clusters_operations.py @@ -1615,8 +1615,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1834,7 +1834,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2164,7 +2164,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2378,8 +2378,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2950,7 +2950,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_07_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_private_endpoint_connections_operations.py index 72d6ca58b8d3..7c30320295f0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_private_endpoint_connections_operations.py @@ -452,8 +452,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_resolve_private_link_service_id_operations.py index 9a8af158b46b..c48c13ff8a2a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01/operations/_resolve_private_link_service_id_operations.py @@ -174,7 +174,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_07_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_container_service_client.py index d1e52f3ba0e3..bcbffa1b56d1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_container_service_client.py @@ -133,5 +133,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_metadata.json index 508969d9e3fb..1139292fd352 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/_container_service_client.py index 4d3586f58111..2312231e8737 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/_container_service_client.py @@ -134,5 +134,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_agent_pools_operations.py index 458c98056d32..59fbe2dc7599 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_agent_pools_operations.py @@ -398,7 +398,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -773,7 +773,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_maintenance_configurations_operations.py index 9c66ccc3ead5..c7544f11a7ec 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_maintenance_configurations_operations.py @@ -306,8 +306,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_managed_clusters_operations.py index da6f4863b915..a5fbb8f0763d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_managed_clusters_operations.py @@ -868,8 +868,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1087,7 +1087,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1417,7 +1417,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1631,8 +1631,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2203,7 +2203,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_08_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_private_endpoint_connections_operations.py index c0b29f0535c4..a48614b43563 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_private_endpoint_connections_operations.py @@ -278,8 +278,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_resolve_private_link_service_id_operations.py index a3dea645c38a..09c3226531d1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_snapshots_operations.py index 89fd62565042..ece0b99ec03f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_snapshots_operations.py @@ -366,7 +366,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -510,8 +510,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_container_service_client_enums.py index cb73561d8d60..0c3fe8ced3ed 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -303,10 +303,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -314,10 +314,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -326,12 +326,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -354,48 +354,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -405,14 +405,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -425,10 +425,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -436,20 +436,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -475,16 +475,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -492,11 +492,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -505,29 +505,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -535,30 +535,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -576,7 +576,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py index 4e970b8bccdf..cda07bf455ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -290,8 +290,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to @@ -499,8 +499,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -536,8 +536,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -572,7 +572,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_08_01.models.AgentPool] @@ -632,8 +632,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -670,7 +670,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -697,7 +699,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -740,8 +742,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -780,7 +782,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -811,7 +813,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -922,8 +924,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1074,8 +1076,8 @@ def __init__( load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, nat_gateway_profile: Optional["_models.ManagedClusterNATGatewayProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1147,7 +1149,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1176,7 +1178,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1209,7 +1211,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1231,7 +1233,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1262,7 +1264,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1286,7 +1288,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1311,8 +1313,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1352,8 +1354,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1390,8 +1392,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1404,7 +1406,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1474,8 +1477,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1527,7 +1530,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2021_08_01.models.SysctlConfig @@ -1558,8 +1562,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_08_01.models.SysctlConfig @@ -1583,7 +1587,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1624,8 +1629,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1659,7 +1664,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1704,7 +1709,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1930,8 +1935,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2100,8 +2105,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2168,8 +2173,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2209,7 +2219,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2245,8 +2255,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2284,8 +2294,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2522,8 +2532,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to @@ -2928,8 +2938,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to @@ -3140,8 +3150,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3182,7 +3192,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3221,8 +3233,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3283,8 +3295,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3322,7 +3334,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_08_01.models.ManagedCluster] @@ -3391,8 +3403,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3445,7 +3457,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value @@ -3468,7 +3480,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3489,7 +3503,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2021_08_01.models.ResourceReference] @@ -3514,7 +3528,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3558,8 +3572,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3627,8 +3641,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3649,7 +3663,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3673,7 +3689,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3689,7 +3705,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3724,8 +3741,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3761,7 +3778,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3802,8 +3821,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -3837,7 +3856,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -3883,8 +3904,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -3918,7 +3939,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4020,8 +4043,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4103,8 +4126,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4132,8 +4155,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4149,7 +4176,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4168,7 +4196,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4201,8 +4229,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2021_08_01.models.ManagedClusterSKUName @@ -4259,8 +4287,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4326,8 +4354,8 @@ def __init__( admin_password: Optional[str] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4381,7 +4409,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4405,7 +4433,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4448,7 +4476,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4491,7 +4519,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4525,7 +4553,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4557,8 +4585,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4595,7 +4623,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4618,7 +4646,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4639,7 +4667,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4695,8 +4723,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2021_08_01.models.PrivateEndpoint @@ -4725,7 +4753,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4776,8 +4804,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4810,7 +4838,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2021_08_01.models.PrivateLinkResource] @@ -4839,8 +4867,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4864,7 +4892,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4896,7 +4924,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -4952,7 +4982,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5016,8 +5046,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5055,7 +5085,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2021_08_01.models.Snapshot] @@ -5188,8 +5218,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5317,8 +5347,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5357,7 +5387,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5384,8 +5414,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5414,7 +5448,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_agent_pools_operations.py index 7c0b42f05a89..8aaabde9018f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_agent_pools_operations.py @@ -663,7 +663,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1037,7 +1037,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_maintenance_configurations_operations.py index ae2c53f078da..b188bdaae6ee 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_maintenance_configurations_operations.py @@ -461,8 +461,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_managed_clusters_operations.py index 96f20716d13a..28a4265c3b08 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_managed_clusters_operations.py @@ -1615,8 +1615,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1834,7 +1834,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2164,7 +2164,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2378,8 +2378,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2950,7 +2950,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_08_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_private_endpoint_connections_operations.py index 2a1be6987c27..c7aa4a4ea1a0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_private_endpoint_connections_operations.py @@ -452,8 +452,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_resolve_private_link_service_id_operations.py index d1f6d0ed53ad..bc9e3e5f4d4b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_resolve_private_link_service_id_operations.py @@ -174,7 +174,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_snapshots_operations.py index b13c0570c3c5..285efee6fe28 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/operations/_snapshots_operations.py @@ -567,7 +567,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -711,8 +711,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_08_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py index 448699ec6bea..03401213a4bb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py @@ -133,5 +133,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json index 0cff1ffdd189..ed9cba44430d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py index 4ad32519eb00..71e9d2beed3b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py @@ -134,5 +134,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py index 8c8847be1adf..6308ec1cef5c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py @@ -398,7 +398,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -773,7 +773,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py index 7eaf3d2fe8b9..c77bd213f5b4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py @@ -306,8 +306,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py index fc978f4b5fa5..ea44a1cf1a1c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py @@ -868,8 +868,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1087,7 +1087,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1417,7 +1417,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1631,8 +1631,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2203,7 +2203,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_09_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py index 27208b7d4faf..f1c195fe612a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py @@ -278,8 +278,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py index 5c4b9b520c3c..e3ef862d495c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py index 15d5a62c5b87..cdfe59a5e022 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py @@ -366,7 +366,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -510,8 +510,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py index cb73561d8d60..0c3fe8ced3ed 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -303,10 +303,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -314,10 +314,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -326,12 +326,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -354,48 +354,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -405,14 +405,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -425,10 +425,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -436,20 +436,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -475,16 +475,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -492,11 +492,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -505,29 +505,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -535,30 +535,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -576,7 +576,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py index 705ac5ee282c..fba08b47c29b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -293,8 +293,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -507,8 +507,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -544,8 +544,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -580,7 +580,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_09_01.models.AgentPool] @@ -640,8 +640,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -678,7 +678,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -705,7 +707,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -748,8 +750,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -788,7 +790,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -819,7 +821,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -930,8 +932,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1082,8 +1084,8 @@ def __init__( load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, nat_gateway_profile: Optional["_models.ManagedClusterNATGatewayProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1155,7 +1157,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1184,7 +1186,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1217,7 +1219,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1239,7 +1241,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1270,7 +1272,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1294,7 +1296,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1319,8 +1321,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1360,8 +1362,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1398,8 +1400,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1412,7 +1414,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1482,8 +1485,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1535,7 +1538,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2021_09_01.models.SysctlConfig @@ -1566,8 +1570,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_09_01.models.SysctlConfig @@ -1591,7 +1595,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1632,8 +1637,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1667,7 +1672,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1712,7 +1717,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1938,8 +1943,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2108,8 +2113,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2176,8 +2181,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2217,7 +2227,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2253,8 +2263,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2292,8 +2302,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2533,8 +2543,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -2947,8 +2957,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3165,8 +3175,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3207,7 +3217,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3246,8 +3258,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3308,8 +3320,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3347,7 +3359,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster] @@ -3416,8 +3428,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3470,7 +3482,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value @@ -3493,7 +3505,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3514,7 +3528,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] @@ -3539,7 +3553,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3583,8 +3597,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3652,8 +3666,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3674,7 +3688,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3698,7 +3714,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3714,7 +3730,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3749,8 +3766,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3786,7 +3803,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3827,8 +3846,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -3862,7 +3881,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -3908,8 +3929,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -3943,7 +3964,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4045,8 +4068,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4128,8 +4151,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4157,8 +4180,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4174,7 +4201,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4193,7 +4221,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4226,8 +4254,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSKUName @@ -4284,8 +4312,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4355,8 +4383,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4413,7 +4441,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4437,7 +4465,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4480,7 +4508,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4523,7 +4551,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4557,7 +4585,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4589,8 +4617,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4627,7 +4655,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4650,7 +4678,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4671,7 +4699,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4727,8 +4755,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpoint @@ -4757,7 +4785,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4808,8 +4836,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4842,7 +4870,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource] @@ -4871,8 +4899,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4896,7 +4924,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4928,7 +4956,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -4984,7 +5014,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5074,8 +5104,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5119,7 +5149,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2021_09_01.models.Snapshot] @@ -5252,8 +5282,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5381,8 +5411,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5421,7 +5451,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5448,8 +5478,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5478,7 +5512,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5517,8 +5553,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py index 8d5583bc714a..dfc8ee232bf6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py @@ -663,7 +663,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1037,7 +1037,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py index 09958d92c92f..ac41a8cdfa05 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py @@ -461,8 +461,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py index 18fdb4f63fcf..6e139423be32 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py @@ -1615,8 +1615,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1834,7 +1834,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2164,7 +2164,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2378,8 +2378,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2950,7 +2950,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_09_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py index ba00d2b9ceee..2e14bb8959aa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py @@ -452,8 +452,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py index 84354dd0c36e..048af41ad1f6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py @@ -174,7 +174,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py index 28edfb25a0e2..559c5504e28b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py @@ -567,7 +567,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -711,8 +711,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_container_service_client.py index 40fe62dd9a76..6cdc1e834360 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_container_service_client.py @@ -133,5 +133,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_metadata.json index bd8c3465342c..96807dfce6cf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/_container_service_client.py index e0da2153494a..d7f6401e2480 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/_container_service_client.py @@ -134,5 +134,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_agent_pools_operations.py index 2a49a15e63bf..2e3291dd600f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_agent_pools_operations.py @@ -398,7 +398,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -778,7 +778,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_maintenance_configurations_operations.py index 5be2d4a9eaaf..c8d145f12d53 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_maintenance_configurations_operations.py @@ -306,8 +306,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_managed_clusters_operations.py index 4e4440e57886..6e41a4e8470a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_managed_clusters_operations.py @@ -868,8 +868,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1087,7 +1087,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1417,7 +1417,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1631,8 +1631,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2203,7 +2203,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_10_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_private_endpoint_connections_operations.py index b0d4b1c21e4f..99227b29daa3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_private_endpoint_connections_operations.py @@ -278,8 +278,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_resolve_private_link_service_id_operations.py index 80d68d9b3f16..358d8aed35a8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_snapshots_operations.py index 10690b7da38c..6052b06f613c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/aio/operations/_snapshots_operations.py @@ -366,7 +366,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -510,8 +510,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_container_service_client_enums.py index 5dd606dd070d..fd03b4aa7bf5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -310,10 +310,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -321,10 +321,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -333,12 +333,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -361,48 +361,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -412,14 +412,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -432,10 +432,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -443,20 +443,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -480,16 +480,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -497,11 +497,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -510,29 +510,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -540,30 +540,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -581,7 +581,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_models_py3.py index 3e115a4b4f6d..95cad4b58186 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -293,8 +293,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -507,8 +507,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -544,8 +544,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -580,7 +580,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_10_01.models.AgentPool] @@ -640,8 +640,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -678,7 +678,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -705,7 +707,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -748,8 +750,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -788,7 +790,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -819,7 +821,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -930,8 +932,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1099,8 +1101,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1186,7 +1188,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1215,7 +1217,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1248,7 +1250,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1270,7 +1272,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1301,7 +1303,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1325,7 +1327,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1350,8 +1352,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1391,8 +1393,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1429,8 +1431,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1443,7 +1445,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1513,8 +1516,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1566,7 +1569,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2021_10_01.models.SysctlConfig @@ -1597,8 +1601,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_10_01.models.SysctlConfig @@ -1622,7 +1626,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1663,8 +1668,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1698,7 +1703,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1743,7 +1748,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1969,8 +1974,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2139,8 +2144,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2207,8 +2212,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2248,7 +2258,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2284,8 +2294,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2323,8 +2333,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2564,8 +2574,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -2978,8 +2988,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3196,8 +3206,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3238,7 +3248,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3277,8 +3289,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3339,8 +3351,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3378,7 +3390,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_10_01.models.ManagedCluster] @@ -3447,8 +3459,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3508,7 +3520,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3536,7 +3548,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3557,7 +3571,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2021_10_01.models.ResourceReference] @@ -3582,7 +3596,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3626,8 +3640,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3695,8 +3709,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3717,7 +3731,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3741,7 +3757,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3757,7 +3773,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3792,8 +3809,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3829,7 +3846,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3870,8 +3889,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -3905,7 +3924,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -3951,8 +3972,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -3986,7 +4007,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4088,8 +4111,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4171,8 +4194,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4200,8 +4223,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4217,7 +4244,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4236,7 +4264,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4269,8 +4297,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2021_10_01.models.ManagedClusterSKUName @@ -4327,8 +4355,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4398,8 +4426,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4456,7 +4484,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4480,7 +4508,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4523,7 +4551,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4566,7 +4594,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4600,7 +4628,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4632,8 +4660,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4670,7 +4698,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4693,7 +4721,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4714,7 +4742,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4770,8 +4798,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2021_10_01.models.PrivateEndpoint @@ -4800,7 +4828,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4851,8 +4879,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4885,7 +4913,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2021_10_01.models.PrivateLinkResource] @@ -4914,8 +4942,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4939,7 +4967,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4971,7 +4999,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5027,7 +5057,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5117,8 +5147,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5162,7 +5192,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2021_10_01.models.Snapshot] @@ -5295,8 +5325,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5424,8 +5454,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5464,7 +5494,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5491,8 +5521,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5521,7 +5555,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5560,8 +5596,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_agent_pools_operations.py index a20fed242969..18c170ea6313 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_agent_pools_operations.py @@ -663,7 +663,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1042,7 +1042,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_maintenance_configurations_operations.py index fd7389f811be..8bca5bcf0e06 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_maintenance_configurations_operations.py @@ -461,8 +461,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_managed_clusters_operations.py index a5596f7c6024..f7bd71eed18d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_managed_clusters_operations.py @@ -1615,8 +1615,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1834,7 +1834,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2164,7 +2164,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2378,8 +2378,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2950,7 +2950,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_10_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_private_endpoint_connections_operations.py index a1a3d1ef16fb..aa466c3b232b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_private_endpoint_connections_operations.py @@ -452,8 +452,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_resolve_private_link_service_id_operations.py index ccb720c60761..bead49a3e1f1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_resolve_private_link_service_id_operations.py @@ -174,7 +174,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_snapshots_operations.py index 81016c5ef16b..4eb70689b826 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_snapshots_operations.py @@ -567,7 +567,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -711,8 +711,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_10_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_container_service_client.py index 4877735e56df..327e8c8f4bcf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_container_service_client.py @@ -135,5 +135,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_metadata.json index 16f73713cc5a..a5febc4c3bfb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/_container_service_client.py index 208ae1b78e80..3e25e31fba6b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/_container_service_client.py @@ -135,5 +135,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_agent_pools_operations.py index 86267ea578a4..d4573fc574fd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_agent_pools_operations.py @@ -404,7 +404,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -796,7 +796,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_maintenance_configurations_operations.py index e697ba322f4d..530a7617621d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_managed_clusters_operations.py index 67d0ad47bf35..5a72a72d05db 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_managed_clusters_operations.py @@ -888,8 +888,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1111,7 +1111,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1449,7 +1449,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1669,8 +1669,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2258,7 +2258,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_11_01_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_private_endpoint_connections_operations.py index c6ab8fc45a7c..5bd4bdbdd5fa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -284,8 +284,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_resolve_private_link_service_id_operations.py index 26866cea8037..040d0ae55c25 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_snapshots_operations.py index 68d8706f75a5..723c9841a492 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/aio/operations/_snapshots_operations.py @@ -372,7 +372,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_container_service_client_enums.py index 5dd606dd070d..fd03b4aa7bf5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -310,10 +310,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -321,10 +321,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -333,12 +333,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -361,48 +361,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -412,14 +412,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -432,10 +432,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -443,20 +443,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -480,16 +480,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -497,11 +497,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -510,29 +510,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -540,30 +540,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -581,7 +581,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_models_py3.py index 05213bffb49a..e0d09a89daa9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -307,8 +307,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -534,8 +534,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -571,8 +571,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -607,7 +607,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2021_11_01_preview.models.AgentPool] @@ -667,8 +667,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -705,7 +705,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -732,7 +734,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -775,8 +777,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -816,7 +818,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -848,7 +850,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -959,8 +961,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1133,8 +1135,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1225,7 +1227,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1254,7 +1256,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1287,7 +1289,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1309,7 +1311,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1340,7 +1342,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1365,7 +1367,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1391,8 +1393,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1432,8 +1434,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1471,8 +1473,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1486,7 +1488,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1556,8 +1559,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1609,7 +1612,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2021_11_01_preview.models.SysctlConfig @@ -1640,8 +1644,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2021_11_01_preview.models.SysctlConfig @@ -1665,7 +1669,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1707,8 +1712,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1745,7 +1750,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1790,7 +1795,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2034,8 +2039,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2216,8 +2221,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2284,8 +2289,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2325,7 +2335,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2361,8 +2371,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2400,8 +2410,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2655,8 +2665,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3096,8 +3106,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3327,8 +3337,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3370,7 +3380,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3409,8 +3421,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3472,8 +3484,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3512,7 +3524,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2021_11_01_preview.models.ManagedCluster] @@ -3581,8 +3593,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3642,7 +3654,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3670,7 +3682,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3692,7 +3706,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -3718,7 +3732,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3762,8 +3776,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3803,7 +3817,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -3861,8 +3875,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3884,7 +3898,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3908,7 +3924,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3924,7 +3940,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3959,8 +3976,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3996,7 +4013,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4037,8 +4056,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4072,7 +4091,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4118,8 +4139,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4153,7 +4174,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4255,8 +4278,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4338,8 +4361,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4366,8 +4389,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4382,7 +4409,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4401,7 +4429,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4436,8 +4464,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -4496,8 +4524,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4569,8 +4597,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4629,7 +4657,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4653,7 +4681,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4696,7 +4724,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4739,7 +4767,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4773,7 +4801,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4806,8 +4834,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4845,7 +4873,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4868,7 +4896,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4889,7 +4917,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4946,8 +4974,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -4978,7 +5006,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5029,8 +5057,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5064,7 +5092,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5095,8 +5123,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5121,7 +5149,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5153,7 +5181,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5209,7 +5239,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5300,8 +5330,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5346,7 +5376,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2021_11_01_preview.models.Snapshot] @@ -5479,8 +5509,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5609,8 +5639,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5649,7 +5679,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5676,8 +5706,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5706,7 +5740,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5745,8 +5781,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_agent_pools_operations.py index 4f066041c800..dab3591ec1ba 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_agent_pools_operations.py @@ -684,7 +684,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1075,7 +1075,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_maintenance_configurations_operations.py index 3d07b1a7913b..7d9186363f0e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_managed_clusters_operations.py index f98f81e97369..78d143389ec6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_managed_clusters_operations.py @@ -1675,8 +1675,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1898,7 +1898,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2236,7 +2236,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2456,8 +2456,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3045,7 +3045,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2021_11_01_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_private_endpoint_connections_operations.py index 5460ab894ce1..4d22a4c7157d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_private_endpoint_connections_operations.py @@ -466,8 +466,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_resolve_private_link_service_id_operations.py index 89554c637efd..640763054fd2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_resolve_private_link_service_id_operations.py @@ -176,7 +176,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_snapshots_operations.py index 65b1ac2cc1d6..02b432b70b1c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_snapshots_operations.py @@ -587,7 +587,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -733,8 +733,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2021_11_01_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_container_service_client.py index adad9e61e980..42e380564bce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_container_service_client.py @@ -133,5 +133,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_metadata.json index 32cd9570f93a..353ca99a1f7d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/_container_service_client.py index 8f766ef1f11f..994a467adebd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/_container_service_client.py @@ -134,5 +134,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_agent_pools_operations.py index b9d739046c92..101cb1d0a5e8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_agent_pools_operations.py @@ -398,7 +398,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -778,7 +778,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_maintenance_configurations_operations.py index 062841aafff7..878d0a8f8370 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_maintenance_configurations_operations.py @@ -306,8 +306,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_managed_clusters_operations.py index c3db1a4bdc56..972550e8612a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_managed_clusters_operations.py @@ -879,8 +879,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1098,7 +1098,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1428,7 +1428,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1642,8 +1642,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2214,7 +2214,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_01_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_private_endpoint_connections_operations.py index 64c905bcf938..69023d0c9d18 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_private_endpoint_connections_operations.py @@ -278,8 +278,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_resolve_private_link_service_id_operations.py index f290107820ff..e38143c5bbfe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_snapshots_operations.py index c494f8378bcd..2c16c1f71401 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/aio/operations/_snapshots_operations.py @@ -366,7 +366,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -510,8 +510,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_container_service_client_enums.py index 3f3a6ff62be3..3cee00d55630 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,48 +371,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -422,14 +422,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -442,10 +442,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -453,20 +453,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -490,16 +490,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -507,11 +507,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -520,29 +520,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -550,30 +550,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -591,7 +591,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_models_py3.py index 548f2e40cfac..b18fd114a9c2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -293,8 +293,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -507,8 +507,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -544,8 +544,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -580,7 +580,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_01_01.models.AgentPool] @@ -640,8 +640,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -678,7 +678,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -705,7 +707,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -748,8 +750,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -788,7 +790,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -819,7 +821,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -930,8 +932,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1099,8 +1101,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1186,7 +1188,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1215,7 +1217,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1248,7 +1250,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1270,7 +1272,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1301,7 +1303,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1325,7 +1327,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1350,8 +1352,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1391,8 +1393,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1429,8 +1431,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1443,7 +1445,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1513,8 +1516,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1566,7 +1569,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_01_01.models.SysctlConfig @@ -1597,8 +1601,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_01_01.models.SysctlConfig @@ -1622,7 +1626,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1663,8 +1668,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1698,7 +1703,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1743,7 +1748,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1969,8 +1974,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2139,8 +2144,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2207,8 +2212,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2248,7 +2258,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2284,8 +2294,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2323,8 +2333,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2564,8 +2574,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -2978,8 +2988,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3196,8 +3206,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3238,7 +3248,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3277,8 +3289,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3339,8 +3351,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3378,7 +3390,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_01_01.models.ManagedCluster] @@ -3447,8 +3459,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3508,7 +3520,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3536,7 +3548,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3557,7 +3571,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_01_01.models.ResourceReference] @@ -3582,7 +3596,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3626,8 +3640,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3695,8 +3709,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3717,7 +3731,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3741,7 +3757,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3757,7 +3773,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3792,8 +3809,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3829,7 +3846,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3870,8 +3889,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -3905,7 +3924,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -3951,8 +3972,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -3986,7 +4007,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4088,8 +4111,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4171,8 +4194,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4199,8 +4222,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4215,7 +4242,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4234,7 +4262,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4267,8 +4295,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_01_01.models.ManagedClusterSKUName @@ -4325,8 +4353,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4396,8 +4424,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4454,7 +4482,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4478,7 +4506,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4521,7 +4549,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4564,7 +4592,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4598,7 +4626,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4630,8 +4658,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4668,7 +4696,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4691,7 +4719,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4712,7 +4740,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4768,8 +4796,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_01_01.models.PrivateEndpoint @@ -4798,7 +4826,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4849,8 +4877,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4883,7 +4911,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_01_01.models.PrivateLinkResource] @@ -4912,8 +4940,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4937,7 +4965,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4969,7 +4997,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5025,7 +5055,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5115,8 +5145,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5160,7 +5190,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_01_01.models.Snapshot] @@ -5293,8 +5323,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5422,8 +5452,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5462,7 +5492,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5489,8 +5519,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5519,7 +5553,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5558,8 +5594,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_agent_pools_operations.py index 75f629de2710..0f55c57198a8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_agent_pools_operations.py @@ -663,7 +663,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1042,7 +1042,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_maintenance_configurations_operations.py index 5949d42f1f58..f42cf631dcd2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_maintenance_configurations_operations.py @@ -461,8 +461,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_managed_clusters_operations.py index f0d13d30e384..7b3302a53c54 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_managed_clusters_operations.py @@ -1629,8 +1629,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1848,7 +1848,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2178,7 +2178,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2392,8 +2392,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2964,7 +2964,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_01_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_private_endpoint_connections_operations.py index a59cbea85119..ef3b2f9aeb3e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_private_endpoint_connections_operations.py @@ -452,8 +452,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_resolve_private_link_service_id_operations.py index 75b88cfb890f..a4c1f2339eec 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_resolve_private_link_service_id_operations.py @@ -174,7 +174,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_snapshots_operations.py index a858f7df5ddd..c24b46146582 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_snapshots_operations.py @@ -567,7 +567,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -711,8 +711,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_container_service_client.py index 22a1e231caca..54e3b8c051de 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_container_service_client.py @@ -135,5 +135,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_metadata.json index 0f2a834689ec..04880dc38545 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/_container_service_client.py index c1597f2aac63..e7e99f21a3f5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/_container_service_client.py @@ -135,5 +135,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_agent_pools_operations.py index d20221fceb1b..c63ac622d36a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_agent_pools_operations.py @@ -404,7 +404,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -796,7 +796,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_maintenance_configurations_operations.py index 4203e2e2c578..bca395cdb728 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_managed_clusters_operations.py index 64ec2a7c6588..dbb6df5f2c1c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_managed_clusters_operations.py @@ -899,8 +899,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1122,7 +1122,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1460,7 +1460,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1680,8 +1680,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2269,7 +2269,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_01_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_private_endpoint_connections_operations.py index 57a81ae69cbc..fb1779e78ee1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -284,8 +284,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 9bf0f44338a6..451baa53f819 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -130,7 +130,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_snapshots_operations.py index 6242c59c27ff..8b246c4dd922 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_snapshots_operations.py @@ -372,7 +372,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_container_service_client_enums.py index 1dc9bcf3d738..af475e6161b7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,51 +371,51 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -425,14 +425,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -445,10 +445,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -456,20 +456,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -493,16 +493,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -510,11 +510,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -523,29 +523,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -553,30 +553,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -594,7 +594,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_models_py3.py index 6b84cca602c6..6aa5f4a72c2b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -314,8 +314,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -547,8 +547,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -584,8 +584,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -620,7 +620,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_01_02_preview.models.AgentPool] @@ -680,8 +680,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -718,7 +718,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -745,7 +747,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -788,8 +790,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -829,7 +831,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -861,7 +863,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -972,8 +974,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1146,8 +1148,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1238,7 +1240,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1267,7 +1269,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1300,7 +1302,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1322,7 +1324,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1353,7 +1355,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1378,7 +1380,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1404,8 +1406,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1445,8 +1447,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1484,8 +1486,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1499,7 +1501,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1569,8 +1572,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1622,7 +1625,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_01_02_preview.models.SysctlConfig @@ -1653,8 +1657,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_01_02_preview.models.SysctlConfig @@ -1678,7 +1682,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1720,8 +1725,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1758,7 +1763,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1803,7 +1808,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2047,8 +2052,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2229,8 +2234,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2297,8 +2302,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2338,7 +2348,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2374,8 +2384,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2413,8 +2423,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2675,8 +2685,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3129,8 +3139,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3366,8 +3376,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3409,7 +3419,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3448,8 +3460,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3511,8 +3523,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3551,7 +3563,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_01_02_preview.models.ManagedCluster] @@ -3620,8 +3632,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3681,7 +3693,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3709,7 +3721,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3731,7 +3745,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -3757,7 +3771,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3801,8 +3815,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3842,7 +3856,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -3900,8 +3914,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3923,7 +3937,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3947,7 +3963,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3963,7 +3979,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3998,8 +4015,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4035,7 +4052,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4076,8 +4095,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4111,7 +4130,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4157,8 +4178,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4192,7 +4213,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4294,8 +4317,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4377,8 +4400,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4405,8 +4428,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4421,7 +4448,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4440,7 +4468,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4475,8 +4503,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -4535,8 +4563,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4608,8 +4636,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4668,7 +4696,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4692,7 +4720,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4735,7 +4763,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4778,7 +4806,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4812,7 +4840,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4845,8 +4873,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4884,7 +4912,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4907,7 +4935,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4928,7 +4956,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4985,8 +5013,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -5017,7 +5045,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5068,8 +5096,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5103,7 +5131,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5134,8 +5162,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5160,7 +5188,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5192,7 +5220,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5248,7 +5278,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5339,8 +5369,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5385,7 +5415,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_01_02_preview.models.Snapshot] @@ -5518,8 +5548,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5648,8 +5678,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5688,7 +5718,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5715,8 +5745,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5745,7 +5779,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5784,8 +5820,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_agent_pools_operations.py index d3cfb841384c..e82f4d6776f3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_agent_pools_operations.py @@ -684,7 +684,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1075,7 +1075,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_maintenance_configurations_operations.py index a472c0352ac4..d4dc7f06765e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_managed_clusters_operations.py index 31be1f4b1931..1e674b14ccfc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_managed_clusters_operations.py @@ -1689,8 +1689,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1912,7 +1912,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2250,7 +2250,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2470,8 +2470,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3059,7 +3059,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_01_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_private_endpoint_connections_operations.py index 83118dd26902..683234baa5a8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_private_endpoint_connections_operations.py @@ -466,8 +466,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_resolve_private_link_service_id_operations.py index b43c2b5e38b1..5e22922919a8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -176,7 +176,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_snapshots_operations.py index 7a829c246e4d..8933e718b815 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/operations/_snapshots_operations.py @@ -587,7 +587,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -733,8 +733,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_01_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_container_service_client.py index 6963e01c7c04..c94b52f95c73 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_container_service_client.py @@ -132,5 +132,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_metadata.json index 8c0f6eeab619..67b3fb7826f0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/_container_service_client.py index ac5c7fc09c23..290ba0119683 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/_container_service_client.py @@ -133,5 +133,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_agent_pools_operations.py index fc96ebf40a3a..f6679d63f587 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_agent_pools_operations.py @@ -403,7 +403,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -786,7 +786,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_maintenance_configurations_operations.py index 8231353a24d7..161aa1ac8455 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_managed_clusters_operations.py index 74a9a658d0f3..8a576bbe8ae4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_managed_clusters_operations.py @@ -889,8 +889,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1111,7 +1111,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1445,7 +1445,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1662,8 +1662,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2240,7 +2240,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_02_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_private_endpoint_connections_operations.py index 9580a095c0c9..f7f1b4c8298a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_private_endpoint_connections_operations.py @@ -283,8 +283,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_resolve_private_link_service_id_operations.py index f1c09d56e39f..2ad8a45d6b5f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_snapshots_operations.py index 6f08da617538..99ff0d9b4f82 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/aio/operations/_snapshots_operations.py @@ -371,7 +371,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_container_service_client_enums.py index 3f3a6ff62be3..3cee00d55630 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,48 +371,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -422,14 +422,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -442,10 +442,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -453,20 +453,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -490,16 +490,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -507,11 +507,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -520,29 +520,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -550,30 +550,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -591,7 +591,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_models_py3.py index 4f414c3715bb..5332fe513a50 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -293,8 +293,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -507,8 +507,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -544,8 +544,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -580,7 +580,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_02_01.models.AgentPool] @@ -640,8 +640,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -678,7 +678,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -705,7 +707,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -748,8 +750,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -788,7 +790,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -819,7 +821,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -930,8 +932,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1099,8 +1101,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1186,7 +1188,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1215,7 +1217,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1248,7 +1250,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1270,7 +1272,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1301,7 +1303,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1325,7 +1327,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1350,8 +1352,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1391,8 +1393,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1429,8 +1431,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1443,7 +1445,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1513,8 +1516,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1566,7 +1569,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_02_01.models.SysctlConfig @@ -1597,8 +1601,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_02_01.models.SysctlConfig @@ -1622,7 +1626,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1663,8 +1668,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1698,7 +1703,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1750,7 +1755,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -1984,8 +1989,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2154,8 +2159,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2229,8 +2234,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2270,7 +2280,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2306,8 +2316,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2345,8 +2355,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2586,8 +2596,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3000,8 +3010,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3218,8 +3228,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3260,7 +3270,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3299,8 +3311,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3361,8 +3373,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3400,7 +3412,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_02_01.models.ManagedCluster] @@ -3469,8 +3481,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3530,7 +3542,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3558,7 +3570,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3579,7 +3593,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_02_01.models.ResourceReference] @@ -3604,7 +3618,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3648,8 +3662,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3717,8 +3731,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3739,7 +3753,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3763,7 +3779,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3779,7 +3795,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3814,8 +3831,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3851,7 +3868,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3892,8 +3911,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -3927,7 +3946,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -3973,8 +3994,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4008,7 +4029,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4110,8 +4133,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4193,8 +4216,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4221,8 +4244,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4237,7 +4264,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4256,7 +4284,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4289,8 +4317,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_02_01.models.ManagedClusterSKUName @@ -4347,8 +4375,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4418,8 +4446,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4476,7 +4504,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4500,7 +4528,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4543,7 +4571,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4586,7 +4614,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4620,7 +4648,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4652,8 +4680,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4690,7 +4718,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4713,7 +4741,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4734,7 +4762,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4790,8 +4818,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_02_01.models.PrivateEndpoint @@ -4820,7 +4848,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -4871,8 +4899,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -4905,7 +4933,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_02_01.models.PrivateLinkResource] @@ -4934,8 +4962,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -4959,7 +4987,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -4991,7 +5019,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5047,7 +5077,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5140,8 +5170,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5184,7 +5214,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_02_01.models.Snapshot] @@ -5317,8 +5347,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5446,8 +5476,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5486,7 +5516,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5513,8 +5543,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5543,7 +5577,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5582,8 +5618,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_agent_pools_operations.py index 5cbae7d788da..75644ff261fe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_agent_pools_operations.py @@ -682,7 +682,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1064,7 +1064,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_maintenance_configurations_operations.py index a17af5a12157..842e19423ab1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_managed_clusters_operations.py index 4a8cc34ea75b..42495a305956 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_managed_clusters_operations.py @@ -1675,8 +1675,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1897,7 +1897,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2231,7 +2231,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2448,8 +2448,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3026,7 +3026,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_02_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_private_endpoint_connections_operations.py index 3b886fcee5e5..d40b0c2935b9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_private_endpoint_connections_operations.py @@ -465,8 +465,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_resolve_private_link_service_id_operations.py index 46d62efb0749..8d7963441618 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_resolve_private_link_service_id_operations.py @@ -179,7 +179,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_snapshots_operations.py index 88ae93a9bec7..9a4b3c20890d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_01/operations/_snapshots_operations.py @@ -582,7 +582,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -729,8 +729,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_container_service_client.py index 162b4088414a..695d81f6c4ac 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_container_service_client.py @@ -141,5 +141,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_metadata.json index 54f9cd24028a..adb18e0b7b83 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/_container_service_client.py index 3d5961104fdc..fe41abbe780b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/_container_service_client.py @@ -141,5 +141,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_agent_pools_operations.py index 4cd56432efec..1f4509cae5e0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_agent_pools_operations.py @@ -409,7 +409,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -804,7 +804,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_maintenance_configurations_operations.py index 6c8ecc518b55..5ab63d3553ad 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 3d29c1a43c80..c9e6d668e872 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_clusters_operations.py index 1ca445c570d1..e24daf9fcdf0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_managed_clusters_operations.py @@ -909,8 +909,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1135,7 +1135,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1477,7 +1477,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1700,8 +1700,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2295,7 +2295,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_02_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_private_endpoint_connections_operations.py index bc6165e9acc1..94e1ce9bfbad 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index a35ed28af55e..a7c4473ab228 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_snapshots_operations.py index 56530662abb6..9656577cd819 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_container_service_client_enums.py index d9babf886c17..ea19f604b48b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,51 +371,51 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -425,14 +425,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -445,10 +445,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -456,20 +456,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -493,16 +493,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -510,11 +510,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -523,31 +523,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -555,30 +555,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -596,7 +596,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_models_py3.py index 4e6434947355..a0f01cf2a6cf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -314,8 +314,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -547,8 +547,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -584,8 +584,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -620,7 +620,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_02_02_preview.models.AgentPool] @@ -680,8 +680,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -718,7 +718,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -745,7 +747,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -776,7 +778,7 @@ class AzureKeyVaultKms(_serialization.Model): "key_id": {"key": "keyId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, key_id: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, key_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -823,8 +825,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -864,7 +866,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -896,7 +898,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1007,8 +1009,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1181,8 +1183,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1273,7 +1275,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1302,7 +1304,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1335,7 +1337,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1357,7 +1359,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1388,7 +1390,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1413,7 +1415,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1439,8 +1441,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1480,8 +1482,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1519,8 +1521,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1534,7 +1536,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1604,8 +1607,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1657,7 +1660,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_02_02_preview.models.SysctlConfig @@ -1688,8 +1692,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_02_02_preview.models.SysctlConfig @@ -1713,7 +1717,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1755,8 +1760,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1793,7 +1798,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1845,7 +1850,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2097,8 +2102,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2279,8 +2284,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2354,8 +2359,13 @@ class ManagedClusterAccessProfile(Resource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -2395,7 +2405,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2431,8 +2441,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2470,8 +2480,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2732,8 +2742,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3186,8 +3196,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3423,8 +3433,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3466,7 +3476,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3505,8 +3517,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3568,8 +3580,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3608,7 +3620,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedCluster] @@ -3677,8 +3689,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3738,7 +3750,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3766,7 +3778,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3788,7 +3802,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -3814,7 +3828,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3858,8 +3872,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3899,7 +3913,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -3957,8 +3971,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3980,7 +3994,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4004,7 +4020,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4020,7 +4036,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4055,8 +4072,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4092,7 +4109,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4133,8 +4152,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4168,7 +4187,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4214,8 +4235,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4249,7 +4270,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4351,8 +4374,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4454,8 +4477,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -4495,8 +4518,8 @@ def __init__( *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4529,8 +4552,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4545,7 +4572,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4564,7 +4592,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4599,8 +4627,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -4682,8 +4710,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -4724,7 +4752,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -4778,8 +4806,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4851,8 +4879,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4911,7 +4939,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4953,8 +4981,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -4997,7 +5025,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5040,7 +5068,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -5083,7 +5111,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -5117,7 +5145,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5150,8 +5178,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5189,7 +5217,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5212,7 +5240,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5233,7 +5261,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5290,8 +5318,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -5322,7 +5350,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5373,8 +5401,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5408,7 +5436,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5439,8 +5467,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5465,7 +5493,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5497,7 +5525,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5553,7 +5583,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5648,8 +5678,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource location. Required. :paramtype location: str @@ -5694,7 +5724,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_02_02_preview.models.Snapshot] @@ -5827,8 +5857,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5957,8 +5987,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5997,7 +6027,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6024,8 +6054,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -6054,7 +6088,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -6093,8 +6129,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_agent_pools_operations.py index c29ee79c4670..ebffebf7c43f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_agent_pools_operations.py @@ -703,7 +703,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1097,7 +1097,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_maintenance_configurations_operations.py index 0a10269b56a4..14861239f3e3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_cluster_snapshots_operations.py index bef9975745ba..d2be4e7170c2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_clusters_operations.py index 9eec84ef3613..294a99d2ce74 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_managed_clusters_operations.py @@ -1735,8 +1735,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1961,7 +1961,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2303,7 +2303,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2526,8 +2526,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3121,7 +3121,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_02_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_private_endpoint_connections_operations.py index 42aaa44714b9..89c8e26990eb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_resolve_private_link_service_id_operations.py index 7ba2adc2e429..0956228b402b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_snapshots_operations.py index 4566bfb108f1..4345c26b6f65 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_02_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_02_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_container_service_client.py index e60bc66044be..5fc47f43f360 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_container_service_client.py @@ -132,5 +132,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_metadata.json index 006b59947ed0..e23503139693 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/_container_service_client.py index 82114620513e..49dcb1407730 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/_container_service_client.py @@ -133,5 +133,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_agent_pools_operations.py index 08da314a6d35..64050cf758b8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_agent_pools_operations.py @@ -403,7 +403,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -786,7 +786,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_maintenance_configurations_operations.py index 087b41d6303b..c8a5bf0a13ee 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_managed_clusters_operations.py index 3b725b18e45e..8715e02c7537 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_managed_clusters_operations.py @@ -889,8 +889,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1111,7 +1111,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1445,7 +1445,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1662,8 +1662,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2240,7 +2240,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_03_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_private_endpoint_connections_operations.py index 0ac58b56d02e..4455ac7c178c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_private_endpoint_connections_operations.py @@ -283,8 +283,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_resolve_private_link_service_id_operations.py index 32225598b2de..2ba2043a1705 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_snapshots_operations.py index 651d2bd71824..10f7537609e3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/aio/operations/_snapshots_operations.py @@ -371,7 +371,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_container_service_client_enums.py index 3f3a6ff62be3..3cee00d55630 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,48 +371,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -422,14 +422,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -442,10 +442,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -453,20 +453,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -490,16 +490,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -507,11 +507,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -520,29 +520,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -550,30 +550,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -591,7 +591,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_models_py3.py index a04458c78db3..f9e87f81a3db 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -293,8 +293,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -507,8 +507,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -544,8 +544,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -580,7 +580,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_03_01.models.AgentPool] @@ -640,8 +640,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -678,7 +678,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -705,7 +707,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -748,8 +750,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -788,7 +790,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -819,7 +821,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -930,8 +932,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1099,8 +1101,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1186,7 +1188,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1215,7 +1217,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1248,7 +1250,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1270,7 +1272,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1301,7 +1303,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1325,7 +1327,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1350,8 +1352,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1391,8 +1393,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1429,8 +1431,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1443,7 +1445,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1513,8 +1516,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1566,7 +1569,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_03_01.models.SysctlConfig @@ -1597,8 +1601,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_03_01.models.SysctlConfig @@ -1622,7 +1626,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1663,8 +1668,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1698,7 +1703,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1741,7 +1746,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1751,7 +1756,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1791,7 +1797,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2021,8 +2027,8 @@ def __init__( # pylint: disable=too-many-locals http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2191,8 +2197,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2266,8 +2272,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2307,7 +2318,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2343,8 +2354,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2382,8 +2393,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2623,8 +2634,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3037,8 +3048,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3255,8 +3266,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3297,7 +3308,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3336,8 +3349,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3398,8 +3411,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3437,7 +3450,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_03_01.models.ManagedCluster] @@ -3506,8 +3519,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3567,7 +3580,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3595,7 +3608,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3616,7 +3631,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_03_01.models.ResourceReference] @@ -3641,7 +3656,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3685,8 +3700,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3754,8 +3769,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3776,7 +3791,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3800,7 +3817,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3816,7 +3833,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3851,8 +3869,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3888,7 +3906,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3929,8 +3949,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -3964,7 +3984,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4010,8 +4032,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4045,7 +4067,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4147,8 +4171,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4230,8 +4254,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4258,8 +4282,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4274,7 +4302,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4293,7 +4322,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4326,8 +4355,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_03_01.models.ManagedClusterSKUName @@ -4367,8 +4396,8 @@ def __init__( disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -4397,7 +4426,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -4417,7 +4446,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -4437,7 +4466,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -4489,8 +4518,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4560,8 +4589,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4618,7 +4647,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4642,7 +4671,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4685,7 +4714,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4728,7 +4757,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4762,7 +4791,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4794,8 +4823,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4832,7 +4861,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4855,7 +4884,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4876,7 +4905,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -4932,8 +4961,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_03_01.models.PrivateEndpoint @@ -4962,7 +4991,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5013,8 +5042,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5047,7 +5076,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_03_01.models.PrivateLinkResource] @@ -5076,8 +5105,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5101,7 +5130,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5133,7 +5162,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5189,7 +5220,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5282,8 +5313,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5326,7 +5357,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_03_01.models.Snapshot] @@ -5459,8 +5490,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5588,8 +5619,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5628,7 +5659,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5655,8 +5686,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5685,7 +5720,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5724,8 +5761,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_agent_pools_operations.py index 93ed88cf2b39..44249e9667d5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_agent_pools_operations.py @@ -682,7 +682,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1064,7 +1064,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_maintenance_configurations_operations.py index 8f04a545d174..eb408dbdd642 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_managed_clusters_operations.py index 1a0bfb4458da..8665a0a9904f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_managed_clusters_operations.py @@ -1675,8 +1675,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1897,7 +1897,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2231,7 +2231,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2448,8 +2448,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3026,7 +3026,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_03_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_private_endpoint_connections_operations.py index 8d71ff8831c6..c4e6d143db94 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_private_endpoint_connections_operations.py @@ -465,8 +465,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_resolve_private_link_service_id_operations.py index cbdf5f84c9cc..cd157481b614 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_resolve_private_link_service_id_operations.py @@ -179,7 +179,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_snapshots_operations.py index 71f2c01a64d1..f82016654d43 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_01/operations/_snapshots_operations.py @@ -582,7 +582,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -729,8 +729,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_container_service_client.py index ca48d6fdb190..ef038a65957e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_container_service_client.py @@ -141,5 +141,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_metadata.json index 8410053c5e9f..76ed27189cae 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/_container_service_client.py index 877db1ee86aa..015e47395a3a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/_container_service_client.py @@ -141,5 +141,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_agent_pools_operations.py index 9ec05d547699..c9a7df21997b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_agent_pools_operations.py @@ -409,7 +409,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -819,7 +819,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_maintenance_configurations_operations.py index f9c870975736..45d9370d3f8a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 320427ec25b3..6f7561113f0f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_clusters_operations.py index 85dcacad3f1c..428fa2125f21 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_managed_clusters_operations.py @@ -910,8 +910,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1136,7 +1136,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1493,7 +1493,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1716,8 +1716,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2429,7 +2429,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_03_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_private_endpoint_connections_operations.py index 769eff33da04..c94749120243 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 9896be76dc08..b1e8340de0fa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_snapshots_operations.py index c3d8da5aa564..2a5217b5bfba 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_container_service_client_enums.py index d9babf886c17..ea19f604b48b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,51 +371,51 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -425,14 +425,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -445,10 +445,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -456,20 +456,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -493,16 +493,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -510,11 +510,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -523,31 +523,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -555,30 +555,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -596,7 +596,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_models_py3.py index 9aaaaaea44ae..81dd74d996da 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -323,8 +323,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -564,8 +564,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -601,8 +601,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -637,7 +637,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_03_02_preview.models.AgentPool] @@ -697,8 +697,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -735,7 +735,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -762,7 +764,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -793,7 +795,7 @@ class AzureKeyVaultKms(_serialization.Model): "key_id": {"key": "keyId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, key_id: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, key_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -840,8 +842,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -881,7 +883,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -913,7 +915,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1024,8 +1026,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1198,8 +1200,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1290,7 +1292,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1319,7 +1321,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1352,7 +1354,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1374,7 +1376,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1405,7 +1407,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1430,7 +1432,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1456,8 +1458,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1497,8 +1499,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1536,8 +1538,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1551,7 +1553,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1621,8 +1624,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1674,7 +1677,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_03_02_preview.models.SysctlConfig @@ -1705,8 +1709,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_03_02_preview.models.SysctlConfig @@ -1730,7 +1734,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1772,8 +1777,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1810,7 +1815,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1853,7 +1858,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1863,7 +1868,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1903,7 +1909,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2161,8 +2167,8 @@ def __init__( # pylint: disable=too-many-locals security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, ingress_profile: Optional["_models.ManagedClusterIngressProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2351,8 +2357,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2426,8 +2432,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2467,7 +2478,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2503,8 +2514,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2542,8 +2553,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2813,8 +2824,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3284,8 +3295,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3529,8 +3540,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3572,7 +3583,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3621,8 +3634,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3685,8 +3698,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3718,8 +3731,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -3744,7 +3757,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -3777,7 +3792,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedCluster] @@ -3846,8 +3861,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3907,7 +3922,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3935,7 +3950,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3957,7 +3974,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -3983,7 +4000,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4027,8 +4044,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4068,7 +4085,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4126,8 +4143,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4149,7 +4166,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4173,7 +4192,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4189,7 +4208,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4224,8 +4244,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4261,7 +4281,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4302,8 +4324,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4337,7 +4359,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4383,8 +4407,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4418,7 +4442,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4520,8 +4546,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4623,8 +4649,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -4670,8 +4696,8 @@ def __init__( azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4709,8 +4735,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4735,7 +4765,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -4745,7 +4775,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4764,7 +4795,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4799,8 +4830,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -4882,8 +4913,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -4924,7 +4955,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -4961,8 +4992,8 @@ def __init__( disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -4994,7 +5025,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5017,7 +5048,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5037,7 +5068,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -5089,8 +5120,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -5162,8 +5193,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -5222,7 +5253,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -5264,8 +5295,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -5308,7 +5339,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5351,7 +5382,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -5394,7 +5425,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -5428,7 +5459,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5461,8 +5492,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5500,7 +5531,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5523,7 +5554,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5544,7 +5575,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5601,8 +5632,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -5633,7 +5664,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5684,8 +5715,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5719,7 +5750,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5750,8 +5781,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5776,7 +5807,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5808,7 +5839,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5864,7 +5897,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5959,8 +5992,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6005,7 +6038,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_03_02_preview.models.Snapshot] @@ -6138,8 +6171,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -6268,8 +6301,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -6308,7 +6341,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6335,8 +6368,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -6365,7 +6402,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -6404,8 +6443,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_agent_pools_operations.py index f44d63a4e62b..090feac2805b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_agent_pools_operations.py @@ -713,7 +713,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1122,7 +1122,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_maintenance_configurations_operations.py index e8a0798bbd3b..bd599e6fbbfd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_cluster_snapshots_operations.py index 6a3af1c8ac58..16859fc861b0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_clusters_operations.py index 3dc42cebd7d0..e1d3d8565614 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_clusters_operations.py @@ -1786,8 +1786,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2012,7 +2012,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2369,7 +2369,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2592,8 +2592,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3305,7 +3305,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_03_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_private_endpoint_connections_operations.py index 798b18b1f3d3..cf699c63bb66 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_resolve_private_link_service_id_operations.py index a252abe9f45f..7f6257f9ce42 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_snapshots_operations.py index 68e7a75a753e..88a573d890a6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_03_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_container_service_client.py index 10aaae8369cd..d7ce13682e52 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_container_service_client.py @@ -132,5 +132,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_metadata.json index 9643c0c90fce..58ef8bca3e78 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/_container_service_client.py index 715927ee3f68..b7dc34a810d0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/_container_service_client.py @@ -133,5 +133,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_agent_pools_operations.py index 87ec60b3185d..31b590040110 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_agent_pools_operations.py @@ -403,7 +403,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -786,7 +786,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_maintenance_configurations_operations.py index dcd023f90eb8..6e895350bccf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_managed_clusters_operations.py index b31d02c8c00c..202395498072 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_managed_clusters_operations.py @@ -889,8 +889,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1111,7 +1111,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1445,7 +1445,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1662,8 +1662,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2240,7 +2240,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_04_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_private_endpoint_connections_operations.py index fe232b6e4e16..b049df5b769f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_private_endpoint_connections_operations.py @@ -283,8 +283,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_resolve_private_link_service_id_operations.py index 3fbe56e69e0a..37de042edb32 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_snapshots_operations.py index 93715800d444..39fb1b592035 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/aio/operations/_snapshots_operations.py @@ -371,7 +371,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_container_service_client_enums.py index 3f3a6ff62be3..3cee00d55630 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,48 +371,48 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -422,14 +422,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -442,10 +442,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -453,20 +453,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -490,16 +490,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -507,11 +507,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -520,29 +520,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -550,30 +550,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -591,7 +591,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_models_py3.py index a0f48aa5e338..c232915ff2e3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -303,8 +303,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -522,8 +522,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -559,8 +559,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -595,7 +595,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_04_01.models.AgentPool] @@ -655,8 +655,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -693,7 +693,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -720,7 +722,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -763,8 +765,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -803,7 +805,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -834,7 +836,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -945,8 +947,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1114,8 +1116,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure" and "kubenet". @@ -1201,7 +1203,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1230,7 +1232,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1263,7 +1265,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1285,7 +1287,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1316,7 +1318,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1340,7 +1342,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1365,8 +1367,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1406,8 +1408,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1444,8 +1446,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1458,7 +1460,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1528,8 +1531,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1581,7 +1584,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_04_01.models.SysctlConfig @@ -1612,8 +1616,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_04_01.models.SysctlConfig @@ -1637,7 +1641,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1678,8 +1683,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1713,7 +1718,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1756,7 +1761,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1766,7 +1771,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1806,7 +1812,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2051,8 +2057,8 @@ def __init__( # pylint: disable=too-many-locals security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2230,8 +2236,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2305,8 +2311,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2346,7 +2357,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2382,8 +2393,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2421,8 +2432,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2672,8 +2683,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3101,8 +3112,8 @@ def __init__( # pylint: disable=too-many-locals enable_fips: Optional[bool] = None, gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3323,8 +3334,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3365,7 +3376,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3404,8 +3417,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3466,8 +3479,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3505,7 +3518,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_04_01.models.ManagedCluster] @@ -3574,8 +3587,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3635,7 +3648,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3663,7 +3676,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3684,7 +3699,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_04_01.models.ResourceReference] @@ -3709,7 +3724,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3753,8 +3768,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3822,8 +3837,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3844,7 +3859,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3868,7 +3885,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3884,7 +3901,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -3919,8 +3937,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -3956,7 +3974,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -3997,8 +4017,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4032,7 +4052,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4078,8 +4100,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4113,7 +4135,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4215,8 +4239,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4298,8 +4322,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): } def __init__( - self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs - ): + self, *, azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4326,8 +4350,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4342,7 +4370,8 @@ def __init__( class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4361,7 +4390,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4394,8 +4423,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_04_01.models.ManagedClusterSKUName @@ -4435,8 +4464,8 @@ def __init__( disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -4465,7 +4494,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -4485,7 +4514,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -4505,7 +4534,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -4557,8 +4586,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4628,8 +4657,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4686,7 +4715,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4710,7 +4739,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4753,7 +4782,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4796,7 +4825,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4830,7 +4859,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -4862,8 +4891,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -4900,7 +4929,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -4923,7 +4952,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -4944,7 +4973,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5000,8 +5029,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_04_01.models.PrivateEndpoint @@ -5030,7 +5059,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5081,8 +5110,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5115,7 +5144,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_04_01.models.PrivateLinkResource] @@ -5144,8 +5173,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5169,7 +5198,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5201,7 +5230,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5257,7 +5288,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5350,8 +5381,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5394,7 +5425,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_04_01.models.Snapshot] @@ -5527,8 +5558,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5656,8 +5687,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5696,7 +5727,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5723,8 +5754,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5753,7 +5788,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5792,8 +5829,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_agent_pools_operations.py index 54f807e0ff6c..03897f1dcb72 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_agent_pools_operations.py @@ -682,7 +682,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1064,7 +1064,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_maintenance_configurations_operations.py index c699ab812657..7186a60d3e5a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_managed_clusters_operations.py index e8f413402b3e..3a477ad3e5ee 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_managed_clusters_operations.py @@ -1675,8 +1675,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1897,7 +1897,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2231,7 +2231,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2448,8 +2448,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3026,7 +3026,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_04_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_private_endpoint_connections_operations.py index 5ed18e785454..d5fd97423a11 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_private_endpoint_connections_operations.py @@ -465,8 +465,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_resolve_private_link_service_id_operations.py index e05d06562fd1..6f7a9930d467 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_resolve_private_link_service_id_operations.py @@ -179,7 +179,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_snapshots_operations.py index 41e9a20d895e..93a938d648d7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_snapshots_operations.py @@ -582,7 +582,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -729,8 +729,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_container_service_client.py index 0cddb269af50..74b57544ee6f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_container_service_client.py @@ -155,5 +155,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_metadata.json index 727e3dbcb2ef..d1d37df6ecdd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/_container_service_client.py index abe0690b83b8..a06cf94cac3c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/_container_service_client.py @@ -155,5 +155,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_agent_pools_operations.py index 23b179d143ee..268d7ad524d1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_agent_pools_operations.py @@ -409,7 +409,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -819,7 +819,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_maintenance_configurations_operations.py index c2357b85d178..e7a231e2dee3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 98cf0b078ce4..b5e0c2d04783 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_clusters_operations.py index 0910b36f7a68..a06da2069421 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_managed_clusters_operations.py @@ -910,8 +910,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1136,7 +1136,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1493,7 +1493,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1716,8 +1716,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2429,7 +2429,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_04_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_private_endpoint_connections_operations.py index 29f1c113ce3d..b1b0ae158306 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 6ba67e301ee5..4653ecec628d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_snapshots_operations.py index ca79d1a341d2..e394e079899a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index 5a9839fda590..07793f8097bd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_container_service_client_enums.py index ac6a3e720b2a..05427faac0f6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -320,10 +320,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -331,10 +331,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -343,12 +343,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -371,59 +371,59 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -433,14 +433,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -458,10 +458,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -469,20 +469,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -506,16 +506,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -523,11 +523,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -536,31 +536,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -577,30 +577,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -618,7 +618,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_models_py3.py index 10e3d6c0bf75..7b1058967f5c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -331,8 +331,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -579,8 +579,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -616,8 +616,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -652,7 +652,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_04_02_preview.models.AgentPool] @@ -712,8 +712,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -750,7 +750,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -777,7 +779,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -808,7 +810,7 @@ class AzureKeyVaultKms(_serialization.Model): "key_id": {"key": "keyId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, key_id: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, key_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -855,8 +857,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -896,7 +898,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -928,7 +930,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1039,8 +1041,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1219,8 +1221,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1316,7 +1318,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1345,7 +1347,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1378,7 +1380,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1400,7 +1402,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1431,7 +1433,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1456,7 +1458,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1482,8 +1484,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1523,8 +1525,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1562,8 +1564,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1577,7 +1579,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1647,8 +1650,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1700,7 +1703,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_04_02_preview.models.SysctlConfig @@ -1731,8 +1735,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_04_02_preview.models.SysctlConfig @@ -1756,7 +1760,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1798,8 +1803,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1836,7 +1841,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1879,7 +1884,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1889,7 +1894,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1929,7 +1935,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2192,8 +2198,8 @@ def __init__( # pylint: disable=too-many-locals storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, ingress_profile: Optional["_models.ManagedClusterIngressProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2386,8 +2392,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2461,8 +2467,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2502,7 +2513,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2538,8 +2549,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2577,8 +2588,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2856,8 +2867,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3342,8 +3353,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3604,8 +3615,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3655,7 +3666,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3704,8 +3717,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3768,8 +3781,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3801,8 +3814,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -3827,7 +3840,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -3860,7 +3875,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedCluster] @@ -3929,8 +3944,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3990,7 +4005,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4018,7 +4033,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4040,7 +4057,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4066,7 +4083,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4110,8 +4127,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4151,7 +4168,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4209,8 +4226,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4232,7 +4249,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4256,7 +4275,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4272,7 +4291,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4307,8 +4327,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4344,7 +4364,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4385,8 +4407,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4420,7 +4442,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4466,8 +4490,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4501,7 +4525,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4603,8 +4629,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4706,8 +4732,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -4753,8 +4779,8 @@ def __init__( azure_defender: Optional["_models.ManagedClusterSecurityProfileAzureDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword azure_defender: Azure Defender settings for the security profile. :paramtype azure_defender: @@ -4792,8 +4818,12 @@ class ManagedClusterSecurityProfileAzureDefender(_serialization.Model): } def __init__( - self, *, enabled: Optional[bool] = None, log_analytics_workspace_resource_id: Optional[str] = None, **kwargs - ): + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Defender. :paramtype enabled: bool @@ -4818,7 +4848,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -4828,7 +4858,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4847,7 +4878,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4882,8 +4913,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -4965,8 +4996,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5007,7 +5038,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5044,8 +5075,8 @@ def __init__( disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5077,7 +5108,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5100,7 +5131,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5120,7 +5151,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -5172,8 +5203,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -5245,8 +5276,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -5305,7 +5336,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -5352,8 +5383,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -5400,7 +5431,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5443,7 +5474,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -5486,7 +5517,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -5520,7 +5551,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5553,8 +5584,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5592,7 +5623,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5615,7 +5646,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5636,7 +5667,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5693,8 +5724,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -5725,7 +5756,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5776,8 +5807,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5811,7 +5842,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5842,8 +5873,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5868,7 +5899,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5900,7 +5931,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5956,7 +5989,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -6053,8 +6086,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6099,7 +6132,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_04_02_preview.models.Snapshot] @@ -6232,8 +6265,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -6362,8 +6395,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -6402,7 +6435,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6429,8 +6462,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -6459,7 +6496,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -6499,7 +6538,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -6557,7 +6596,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -6593,7 +6632,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -6625,7 +6664,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6665,7 +6704,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -6702,8 +6741,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_agent_pools_operations.py index 4534c037dd69..8be4a468e188 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_agent_pools_operations.py @@ -713,7 +713,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1122,7 +1122,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_maintenance_configurations_operations.py index d3d890ae7fcc..8e9e33e7a698 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_cluster_snapshots_operations.py index 1aed77a8ee28..244434fb4f54 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_clusters_operations.py index 18f51dae563c..285f0020bbcb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_managed_clusters_operations.py @@ -1786,8 +1786,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2012,7 +2012,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2369,7 +2369,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2592,8 +2592,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3305,7 +3305,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_04_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_private_endpoint_connections_operations.py index 81ca6a6e9581..0cf567bc8cb8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_resolve_private_link_service_id_operations.py index a8516a0550d8..7cf9c738a88e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_snapshots_operations.py index e38522a9b375..0217404fa993 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_trusted_access_role_bindings_operations.py index ec855a81daf0..8d6517d88930 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -505,8 +505,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_04_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_container_service_client.py index 8c08ea4b2745..8e11ae6327ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_container_service_client.py @@ -155,5 +155,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_metadata.json index b032651e85bf..d4a15d70b0e2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/_container_service_client.py index e885e6522adb..cb458ee0026a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/_container_service_client.py @@ -155,5 +155,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_agent_pools_operations.py index 4f646c90aee5..c5675c08b33a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_agent_pools_operations.py @@ -409,7 +409,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -819,7 +819,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_maintenance_configurations_operations.py index 09aa51106801..d96c4e6c8452 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 1b8cae30e499..06c41468151f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_clusters_operations.py index a28cf02ccb75..720ca4cb1c7f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_managed_clusters_operations.py @@ -910,8 +910,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1136,7 +1136,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1493,7 +1493,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1716,8 +1716,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2429,7 +2429,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_05_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_private_endpoint_connections_operations.py index 9e413f990dcb..3f89979533d8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 5ad91a4af685..ec892a235df9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_snapshots_operations.py index 2c75b773f3fc..d8ff501caa9e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index bac0ad90c8a4..07d27dd9b220 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_container_service_client_enums.py index bcc888557894..8544d64ad3c0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -330,10 +330,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -341,10 +341,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -353,12 +353,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -381,59 +381,59 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -443,14 +443,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -468,10 +468,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -479,20 +479,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -516,16 +516,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -533,11 +533,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -546,31 +546,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -587,30 +587,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -628,7 +628,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_models_py3.py index 252d773d0457..82da854c0ee5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -331,8 +331,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -575,8 +575,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -612,8 +612,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -648,7 +648,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_05_02_preview.models.AgentPool] @@ -708,8 +708,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -746,7 +746,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -773,7 +775,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -823,8 +825,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -883,8 +885,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -924,7 +926,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -956,7 +958,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1067,8 +1069,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1247,8 +1249,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1344,7 +1346,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1373,7 +1375,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1406,7 +1408,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1428,7 +1430,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1459,7 +1461,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1484,7 +1486,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1510,8 +1512,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1551,8 +1553,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1590,8 +1592,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1605,7 +1607,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1675,8 +1678,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1728,7 +1731,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_05_02_preview.models.SysctlConfig @@ -1759,8 +1763,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_05_02_preview.models.SysctlConfig @@ -1784,7 +1788,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1826,8 +1831,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1864,7 +1869,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1907,7 +1912,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1917,7 +1922,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1957,7 +1963,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2229,8 +2235,8 @@ def __init__( # pylint: disable=too-many-locals ingress_profile: Optional["_models.ManagedClusterIngressProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2428,8 +2434,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2503,8 +2509,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2544,7 +2555,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2580,8 +2591,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2619,8 +2630,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2898,8 +2909,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3380,8 +3391,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3637,8 +3648,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3688,7 +3699,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3737,8 +3750,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3801,8 +3814,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3834,8 +3847,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -3860,7 +3873,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -3893,7 +3908,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedCluster] @@ -3962,8 +3977,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4023,7 +4038,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4051,7 +4066,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4073,7 +4090,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4099,7 +4116,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4143,8 +4160,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4184,7 +4201,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4242,8 +4259,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4265,7 +4282,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4289,7 +4308,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4305,7 +4324,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4340,8 +4360,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4377,7 +4397,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4418,8 +4440,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4453,7 +4475,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4499,8 +4523,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4534,7 +4558,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4636,8 +4662,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4739,8 +4765,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -4786,8 +4812,8 @@ def __init__( defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -4835,8 +4861,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -4864,7 +4890,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -4884,7 +4910,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -4894,7 +4920,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4913,7 +4940,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4948,8 +4975,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -5031,8 +5058,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5073,7 +5100,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5115,8 +5142,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5149,7 +5176,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -5172,7 +5199,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5195,7 +5222,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5215,7 +5242,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -5267,8 +5294,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -5340,8 +5367,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -5392,7 +5419,9 @@ class ManagedClusterWorkloadAutoScalerProfile(_serialization.Model): "keda": {"key": "keda", "type": "ManagedClusterWorkloadAutoScalerProfileKeda"}, } - def __init__(self, *, keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, **kwargs): + def __init__( + self, *, keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -5420,7 +5449,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -5450,7 +5479,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -5497,8 +5526,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -5545,7 +5574,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5588,7 +5617,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -5631,7 +5660,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -5665,7 +5694,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5698,8 +5727,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5737,7 +5766,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5760,7 +5789,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5781,7 +5810,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5838,8 +5867,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -5870,7 +5899,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5921,8 +5950,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5956,7 +5985,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5987,8 +6016,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -6013,7 +6042,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -6045,7 +6074,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -6101,7 +6132,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -6198,8 +6229,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6244,7 +6275,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_05_02_preview.models.Snapshot] @@ -6377,8 +6408,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -6507,8 +6538,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -6547,7 +6578,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6574,8 +6605,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -6604,7 +6639,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -6644,7 +6681,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -6702,7 +6739,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -6738,7 +6775,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -6770,7 +6807,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6810,7 +6847,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -6847,8 +6884,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_agent_pools_operations.py index 91a76eb6d187..50efb3cd6b89 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_agent_pools_operations.py @@ -713,7 +713,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1122,7 +1122,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_maintenance_configurations_operations.py index dd50f451e958..f9b86042ca49 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_cluster_snapshots_operations.py index 18d51a9dee72..f523932e9a6b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_clusters_operations.py index 49664918584d..7a53f1421fd3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_managed_clusters_operations.py @@ -1786,8 +1786,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2012,7 +2012,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2369,7 +2369,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2592,8 +2592,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3305,7 +3305,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_05_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_private_endpoint_connections_operations.py index f00169d65869..ea427340c25a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_resolve_private_link_service_id_operations.py index 024cd65b7f74..1ea63b73fd3a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_snapshots_operations.py index 4d86376502bc..762b252cb784 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_trusted_access_role_bindings_operations.py index 34d2ed1eac4d..32ba59ea2af0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_05_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -505,8 +505,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_05_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_container_service_client.py index ec85f72ac6c1..3779b7288a19 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_container_service_client.py @@ -132,5 +132,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_metadata.json index bf15c681dd3b..560bf86010a6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/_container_service_client.py index db51770a3bb8..a77ac10db73f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/_container_service_client.py @@ -133,5 +133,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_agent_pools_operations.py index 0c51a8049791..423cec8adbbb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_agent_pools_operations.py @@ -403,7 +403,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -786,7 +786,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_maintenance_configurations_operations.py index b48e945fab8e..2bf29bcb9ac0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_managed_clusters_operations.py index bf58b4383c01..b2e83c2b6f2a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_managed_clusters_operations.py @@ -889,8 +889,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1111,7 +1111,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1445,7 +1445,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1662,8 +1662,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2240,7 +2240,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_06_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_private_endpoint_connections_operations.py index 9c3eb8997b36..5ccbb3fa6b4a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_private_endpoint_connections_operations.py @@ -283,8 +283,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_resolve_private_link_service_id_operations.py index 6b2d1a130d01..df0e1ca4d436 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_snapshots_operations.py index b2232a44ea66..10d592f8763b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/aio/operations/_snapshots_operations.py @@ -371,7 +371,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_container_service_client_enums.py index 6f157dd9cf18..5f82a51b27ee 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -330,10 +330,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -341,10 +341,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -353,12 +353,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -381,51 +381,51 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: No CNI plugin is pre-installed. See `BYO CNI - #: `_ for more information. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """No CNI plugin is pre-installed. See `BYO CNI + #: `_ for more information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -435,14 +435,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -455,10 +455,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -466,20 +466,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -503,16 +503,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -520,11 +520,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -533,29 +533,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -563,30 +563,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -604,7 +604,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_models_py3.py index 0e89b37b573f..5a99bb93463b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -310,8 +310,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -535,8 +535,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -572,8 +572,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -608,7 +608,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_01.models.AgentPool] @@ -668,8 +668,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -706,7 +706,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -733,7 +735,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -783,8 +785,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -843,8 +845,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -883,7 +885,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -914,7 +916,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1025,8 +1027,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1194,8 +1196,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1281,7 +1283,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1310,7 +1312,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1343,7 +1345,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1365,7 +1367,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1396,7 +1398,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1420,7 +1422,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1445,8 +1447,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1486,8 +1488,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1524,8 +1526,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1538,7 +1540,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1608,8 +1611,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1661,7 +1664,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_06_01.models.SysctlConfig @@ -1692,8 +1696,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_06_01.models.SysctlConfig @@ -1717,7 +1721,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1758,8 +1763,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1793,7 +1798,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1836,7 +1841,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1846,7 +1851,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1886,7 +1892,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2131,8 +2137,8 @@ def __init__( # pylint: disable=too-many-locals security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2310,8 +2316,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2385,8 +2391,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2426,7 +2437,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2462,8 +2473,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2501,8 +2512,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2759,8 +2770,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3201,8 +3212,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3429,8 +3440,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3471,7 +3482,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3510,8 +3523,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3572,8 +3585,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3611,7 +3624,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_01.models.ManagedCluster] @@ -3680,8 +3693,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3741,7 +3754,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3769,7 +3782,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3790,7 +3805,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_06_01.models.ResourceReference] @@ -3815,7 +3830,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3859,8 +3874,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3928,8 +3943,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3950,7 +3965,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3974,7 +3991,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -3990,7 +4007,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4025,8 +4043,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4062,7 +4080,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4103,8 +4123,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4138,7 +4158,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4184,8 +4206,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4219,7 +4241,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4321,8 +4345,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4413,8 +4437,8 @@ def __init__( *, defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -4457,8 +4481,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -4486,7 +4510,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -4496,7 +4520,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4515,7 +4540,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4548,8 +4573,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_06_01.models.ManagedClusterSKUName @@ -4589,8 +4614,8 @@ def __init__( disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -4619,7 +4644,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -4639,7 +4664,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -4659,7 +4684,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -4711,8 +4736,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4782,8 +4807,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4840,7 +4865,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4864,7 +4889,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4907,7 +4932,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4950,7 +4975,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4984,7 +5009,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5016,8 +5041,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5054,7 +5079,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5077,7 +5102,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5098,7 +5123,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5154,8 +5179,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_06_01.models.PrivateEndpoint @@ -5184,7 +5209,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5235,8 +5260,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5269,7 +5294,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_01.models.PrivateLinkResource] @@ -5298,8 +5323,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5323,7 +5348,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5355,7 +5380,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5411,7 +5438,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5504,8 +5531,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5548,7 +5575,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_01.models.Snapshot] @@ -5681,8 +5708,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5810,8 +5837,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5850,7 +5877,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5877,8 +5904,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5907,7 +5938,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5946,8 +5979,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_agent_pools_operations.py index 5c4ada26d269..45872ef20682 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_agent_pools_operations.py @@ -682,7 +682,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1064,7 +1064,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_maintenance_configurations_operations.py index 77d64290e4df..4380a3120562 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_managed_clusters_operations.py index 8e6a860cf9d6..173daccabaf6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_managed_clusters_operations.py @@ -1675,8 +1675,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1897,7 +1897,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2231,7 +2231,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2448,8 +2448,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3026,7 +3026,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_06_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_private_endpoint_connections_operations.py index d6bad69c1a59..97f84af810aa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_private_endpoint_connections_operations.py @@ -465,8 +465,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_resolve_private_link_service_id_operations.py index 163860aa882b..6678b7ce9bb2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_resolve_private_link_service_id_operations.py @@ -179,7 +179,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_snapshots_operations.py index 90bded719d31..c107067d4432 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_01/operations/_snapshots_operations.py @@ -582,7 +582,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -729,8 +729,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_container_service_client.py index e66156d8bba1..1bd409ec9208 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_container_service_client.py @@ -164,5 +164,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_metadata.json index 934bb72dc14f..1446b1d0f8bb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/_container_service_client.py index 669f5daced13..eb3eea90c81a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/_container_service_client.py @@ -165,5 +165,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_agent_pools_operations.py index 7bc2f7113db9..5a069400a010 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_agent_pools_operations.py @@ -409,7 +409,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -819,7 +819,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleet_members_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleet_members_operations.py index 5996072224a6..0db82aa1ce18 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleet_members_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleet_members_operations.py @@ -273,8 +273,8 @@ async def begin_create_or_update( :type fleet_name: str :param fleet_member_name: The name of the Fleet member resource. Required. :type fleet_member_name: str - :param parameters: The Fleet member to create or update. Is either a model type or a IO type. - Required. + :param parameters: The Fleet member to create or update. Is either a FleetMember type or a IO + type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.FleetMember or IO :param if_match: Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleets_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleets_operations.py index 4b2e844bd28a..85518a851f78 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleets_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_fleets_operations.py @@ -260,7 +260,7 @@ async def begin_create_or_update( :type resource_group_name: str :param fleet_name: The name of the Fleet resource. Required. :type fleet_name: str - :param parameters: The Fleet to create or update. Is either a model type or a IO type. + :param parameters: The Fleet to create or update. Is either a Fleet type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.Fleet or IO :param if_match: Omit this value to always overwrite the current resource. Specify the @@ -431,8 +431,8 @@ async def update( last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None. :type if_match: str - :param parameters: The properties of a Fleet to update. Is either a model type or a IO type. - Default value is None. + :param parameters: The properties of a Fleet to update. Is either a FleetPatch type or a IO + type. Default value is None. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.FleetPatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_maintenance_configurations_operations.py index 726326bcfad7..e95fe8f2872c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 7e42d66185cf..5ae8fcb7c961 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_clusters_operations.py index 824594be911d..8dd7739f05f6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_managed_clusters_operations.py @@ -910,8 +910,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1136,7 +1136,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1493,7 +1493,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1716,8 +1716,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2429,7 +2429,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_06_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_private_endpoint_connections_operations.py index e90db1a2c05e..0ed1001a36f7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 21eb161b3c8e..6a746faf2dca 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_snapshots_operations.py index ca2b0db8b0f9..d59daccaf46f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index 8b98287736e6..9e4c06cd949a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_container_service_client_enums.py index dae6a1a88096..48785d83ea42 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -313,11 +313,11 @@ class FleetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -352,10 +352,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -363,10 +363,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -375,12 +375,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -403,59 +403,59 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -465,14 +465,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -490,10 +490,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -501,20 +501,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -538,16 +538,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -555,11 +555,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -568,31 +568,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -609,30 +609,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -650,7 +650,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_models_py3.py index 1a63aaaf9c51..d14a7d6dc708 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -331,8 +331,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -575,8 +575,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -612,8 +612,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -648,7 +648,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_02_preview.models.AgentPool] @@ -708,8 +708,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -746,7 +746,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -773,7 +775,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -818,7 +820,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -863,7 +865,7 @@ class AzureEntityResource(Resource): "etag": {"key": "etag", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.etag = None @@ -906,8 +908,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -966,8 +968,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -1007,7 +1009,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1039,7 +1041,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1150,8 +1152,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1330,8 +1332,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1427,7 +1429,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1456,7 +1458,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1489,7 +1491,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1511,7 +1513,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1542,7 +1544,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1567,7 +1569,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1593,8 +1595,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1634,8 +1636,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1674,7 +1676,7 @@ class ErrorAdditionalInfo(_serialization.Model): "info": {"key": "info", "type": "object"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.type = None @@ -1715,7 +1717,7 @@ class ErrorDetail(_serialization.Model): "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -1726,7 +1728,8 @@ def __init__(self, **kwargs): class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ErrorDetail @@ -1736,7 +1739,7 @@ class ErrorResponse(_serialization.Model): "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. :paramtype error: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ErrorDetail @@ -1765,8 +1768,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1780,7 +1783,8 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1820,7 +1824,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -1892,8 +1896,8 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, hub_profile: Optional["_models.FleetHubProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -1929,7 +1933,7 @@ class FleetCredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1954,7 +1958,7 @@ class FleetCredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[FleetCredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1984,7 +1988,7 @@ class FleetHubProfile(_serialization.Model): "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, } - def __init__(self, *, dns_prefix: Optional[str] = None, **kwargs): + def __init__(self, *, dns_prefix: Optional[str] = None, **kwargs: Any) -> None: """ :keyword dns_prefix: DNS prefix used to create the FQDN for the Fleet hub. :paramtype dns_prefix: str @@ -2015,7 +2019,7 @@ class FleetListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Fleet"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Fleet"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of Fleets. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_02_preview.models.Fleet] @@ -2072,7 +2076,7 @@ class FleetMember(AzureEntityResource): "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__(self, *, cluster_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, cluster_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword cluster_resource_id: The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: @@ -2104,7 +2108,7 @@ class FleetMembersListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.FleetMember"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.FleetMember"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of members in a given Fleet. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_02_preview.models.FleetMember] @@ -2125,7 +2129,7 @@ class FleetPatch(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2135,7 +2139,8 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2205,8 +2210,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2258,7 +2263,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_06_02_preview.models.SysctlConfig @@ -2289,8 +2295,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_06_02_preview.models.SysctlConfig @@ -2314,7 +2320,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -2356,8 +2363,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -2394,7 +2401,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2665,8 +2672,8 @@ def __init__( # pylint: disable=too-many-locals ingress_profile: Optional["_models.ManagedClusterIngressProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2864,8 +2871,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2939,8 +2946,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2980,7 +2992,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -3016,8 +3028,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3055,8 +3067,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3334,8 +3346,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3816,8 +3828,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -4073,8 +4085,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -4124,7 +4136,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -4173,8 +4187,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -4237,8 +4251,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -4270,8 +4284,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -4296,7 +4310,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -4329,7 +4345,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedCluster] @@ -4398,8 +4414,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4459,7 +4475,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4487,7 +4503,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4509,7 +4527,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4535,7 +4553,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4579,8 +4597,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4620,7 +4638,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4678,8 +4696,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4701,7 +4719,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4725,7 +4745,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4741,7 +4761,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4776,8 +4797,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4813,7 +4834,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4854,8 +4877,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4889,7 +4912,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4935,8 +4960,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4970,7 +4995,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -5072,8 +5099,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -5175,8 +5202,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -5229,8 +5256,8 @@ def __init__( azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -5284,8 +5311,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -5313,7 +5340,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -5333,7 +5360,7 @@ class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Node Restriction. :paramtype enabled: bool @@ -5353,7 +5380,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -5363,7 +5390,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -5382,7 +5410,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -5417,8 +5445,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -5500,8 +5528,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5542,7 +5570,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5584,8 +5612,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5618,7 +5646,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -5641,7 +5669,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5664,7 +5692,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5684,7 +5712,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -5736,8 +5764,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -5809,8 +5837,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -5861,7 +5889,9 @@ class ManagedClusterWorkloadAutoScalerProfile(_serialization.Model): "keda": {"key": "keda", "type": "ManagedClusterWorkloadAutoScalerProfileKeda"}, } - def __init__(self, *, keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, **kwargs): + def __init__( + self, *, keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -5889,7 +5919,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -5919,7 +5949,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -5966,8 +5996,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -6014,7 +6044,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6057,7 +6087,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -6100,7 +6130,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -6134,7 +6164,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -6167,8 +6197,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -6206,7 +6236,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -6229,7 +6259,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -6250,7 +6280,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -6307,8 +6337,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -6339,7 +6369,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6390,8 +6420,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -6425,7 +6455,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6456,8 +6486,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -6482,7 +6512,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -6514,7 +6544,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -6570,7 +6602,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -6667,8 +6699,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6713,7 +6745,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_06_02_preview.models.Snapshot] @@ -6846,8 +6878,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -6976,8 +7008,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -7016,7 +7048,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7043,8 +7075,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -7073,7 +7109,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -7113,7 +7151,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -7171,7 +7209,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -7207,7 +7245,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -7239,7 +7277,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -7279,7 +7317,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -7316,8 +7354,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_agent_pools_operations.py index adbcfe0a80d8..987d3d5cd634 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_agent_pools_operations.py @@ -713,7 +713,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1122,7 +1122,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleet_members_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleet_members_operations.py index d32cfbadc567..bd3784fb1a59 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleet_members_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleet_members_operations.py @@ -464,8 +464,8 @@ def begin_create_or_update( :type fleet_name: str :param fleet_member_name: The name of the Fleet member resource. Required. :type fleet_member_name: str - :param parameters: The Fleet member to create or update. Is either a model type or a IO type. - Required. + :param parameters: The Fleet member to create or update. Is either a FleetMember type or a IO + type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.FleetMember or IO :param if_match: Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleets_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleets_operations.py index 39be2edf3d91..c737016da0ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleets_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_fleets_operations.py @@ -515,7 +515,7 @@ def begin_create_or_update( :type resource_group_name: str :param fleet_name: The name of the Fleet resource. Required. :type fleet_name: str - :param parameters: The Fleet to create or update. Is either a model type or a IO type. + :param parameters: The Fleet to create or update. Is either a Fleet type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.Fleet or IO :param if_match: Omit this value to always overwrite the current resource. Specify the @@ -686,8 +686,8 @@ def update( last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None. :type if_match: str - :param parameters: The properties of a Fleet to update. Is either a model type or a IO type. - Default value is None. + :param parameters: The properties of a Fleet to update. Is either a FleetPatch type or a IO + type. Default value is None. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.FleetPatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_maintenance_configurations_operations.py index 902ac424556a..0ec98ae9c055 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_cluster_snapshots_operations.py index c9b4db4e3650..d59c18b7eeeb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_clusters_operations.py index 8e0c726804fe..40148d4f37f2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_managed_clusters_operations.py @@ -1786,8 +1786,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2012,7 +2012,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2369,7 +2369,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2592,8 +2592,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3305,7 +3305,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_06_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_private_endpoint_connections_operations.py index a9d0122e7d53..39f482a799e3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_resolve_private_link_service_id_operations.py index 9e2972d7d014..c54496ee723f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_snapshots_operations.py index 529c0f1c8e96..a12ccedd8d06 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_trusted_access_role_bindings_operations.py index 868f814733f0..d8aec8f89161 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_06_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -505,8 +505,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_06_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_container_service_client.py index 2a599cef7889..53582feba424 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_container_service_client.py @@ -132,5 +132,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_metadata.json index 5acc5df3d2d1..acba851bc3b2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/_container_service_client.py index c3821bdc2877..6bc9ad9dee16 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/_container_service_client.py @@ -133,5 +133,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_agent_pools_operations.py index a4ce790abb45..70367a69ac60 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_agent_pools_operations.py @@ -403,7 +403,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -786,7 +786,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_maintenance_configurations_operations.py index 8f92189cde5f..b6df27130bd3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_managed_clusters_operations.py index 4099c0c4b2b5..655baf1ea91a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_managed_clusters_operations.py @@ -889,8 +889,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1111,7 +1111,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1445,7 +1445,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1662,8 +1662,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2240,7 +2240,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_07_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_private_endpoint_connections_operations.py index e4faeb0d52bf..9c4314b82245 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_private_endpoint_connections_operations.py @@ -283,8 +283,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_resolve_private_link_service_id_operations.py index a278b78b3f42..653c740450ef 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_snapshots_operations.py index 7a81c08627d5..24091b81346a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/aio/operations/_snapshots_operations.py @@ -371,7 +371,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_container_service_client_enums.py index beb07820f4a6..3698a3da75d6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -330,10 +330,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -341,10 +341,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -353,12 +353,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -381,51 +381,51 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: No CNI plugin is pre-installed. See `BYO CNI - #: `_ for more information. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """No CNI plugin is pre-installed. See `BYO CNI + #: `_ for more information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -435,14 +435,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -460,10 +460,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -471,20 +471,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -508,16 +508,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -525,11 +525,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -538,29 +538,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -568,30 +568,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -609,7 +609,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_models_py3.py index 45057bbb8062..75bde0e09a3f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -312,8 +312,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -539,8 +539,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -576,8 +576,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -612,7 +612,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_01.models.AgentPool] @@ -672,8 +672,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -710,7 +710,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -737,7 +739,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -787,8 +789,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -847,8 +849,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -887,7 +889,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -918,7 +920,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1029,8 +1031,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1198,8 +1200,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1285,7 +1287,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1314,7 +1316,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1347,7 +1349,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1369,7 +1371,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1400,7 +1402,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1424,7 +1426,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1449,8 +1451,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1490,8 +1492,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1528,8 +1530,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1542,7 +1544,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1612,8 +1615,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1665,7 +1668,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_07_01.models.SysctlConfig @@ -1696,8 +1700,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_07_01.models.SysctlConfig @@ -1721,7 +1725,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1762,8 +1767,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1797,7 +1802,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1840,7 +1845,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1850,7 +1855,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1890,7 +1896,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2135,8 +2141,8 @@ def __init__( # pylint: disable=too-many-locals security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2314,8 +2320,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2389,8 +2395,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2430,7 +2441,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2466,8 +2477,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2505,8 +2516,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2765,8 +2776,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3211,8 +3222,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3441,8 +3452,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3483,7 +3494,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3522,8 +3535,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3584,8 +3597,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3623,7 +3636,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_01.models.ManagedCluster] @@ -3692,8 +3705,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3753,7 +3766,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3781,7 +3794,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3802,7 +3817,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_07_01.models.ResourceReference] @@ -3827,7 +3842,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3871,8 +3886,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3940,8 +3955,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -3962,7 +3977,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -3986,7 +4003,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4002,7 +4019,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4037,8 +4055,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4074,7 +4092,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4115,8 +4135,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4150,7 +4170,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4196,8 +4218,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4231,7 +4253,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4333,8 +4357,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4425,8 +4449,8 @@ def __init__( *, defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -4469,8 +4493,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -4498,7 +4522,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -4508,7 +4532,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4527,7 +4552,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4560,8 +4585,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_07_01.models.ManagedClusterSKUName @@ -4601,8 +4626,8 @@ def __init__( disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -4631,7 +4656,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -4651,7 +4676,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -4671,7 +4696,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -4723,8 +4748,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4794,8 +4819,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4852,7 +4877,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4876,7 +4901,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4919,7 +4944,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -4962,7 +4987,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -4996,7 +5021,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5028,8 +5053,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5066,7 +5091,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5089,7 +5114,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5110,7 +5135,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5166,8 +5191,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_07_01.models.PrivateEndpoint @@ -5196,7 +5221,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5247,8 +5272,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5281,7 +5306,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_01.models.PrivateLinkResource] @@ -5310,8 +5335,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5335,7 +5360,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5367,7 +5392,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5423,7 +5450,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5518,8 +5545,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5562,7 +5589,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_01.models.Snapshot] @@ -5695,8 +5722,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5824,8 +5851,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5864,7 +5891,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5891,8 +5918,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5921,7 +5952,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -5960,8 +5993,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_agent_pools_operations.py index 2b242ea56887..c2164d2edb82 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_agent_pools_operations.py @@ -682,7 +682,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1064,7 +1064,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_maintenance_configurations_operations.py index c3895539d67a..1eaf0a17d884 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_managed_clusters_operations.py index 73485c1237a0..8dd627fe9f0f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_managed_clusters_operations.py @@ -1675,8 +1675,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1897,7 +1897,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2231,7 +2231,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2448,8 +2448,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3026,7 +3026,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_07_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_private_endpoint_connections_operations.py index c8bc086d3dd1..6d5a836bc8cd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_private_endpoint_connections_operations.py @@ -465,8 +465,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_resolve_private_link_service_id_operations.py index 54dc0bde117b..4bf521f13585 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_resolve_private_link_service_id_operations.py @@ -179,7 +179,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_snapshots_operations.py index 1cbb51f05b59..5ce0f0e5e884 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_01/operations/_snapshots_operations.py @@ -582,7 +582,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -729,8 +729,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_container_service_client.py index 3e33eefa8696..77cb66eca882 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_container_service_client.py @@ -164,5 +164,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_metadata.json index 0e53e12115e9..72b525d99a58 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/_container_service_client.py index aa8a741ebb11..43f2a7cedb50 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/_container_service_client.py @@ -165,5 +165,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_agent_pools_operations.py index 8b547f7302f2..8291d6e53d9f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_agent_pools_operations.py @@ -480,7 +480,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -890,7 +890,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleet_members_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleet_members_operations.py index 6649cfd3d855..cff9c92edee5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleet_members_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleet_members_operations.py @@ -273,8 +273,8 @@ async def begin_create_or_update( :type fleet_name: str :param fleet_member_name: The name of the Fleet member resource. Required. :type fleet_member_name: str - :param parameters: The Fleet member to create or update. Is either a model type or a IO type. - Required. + :param parameters: The Fleet member to create or update. Is either a FleetMember type or a IO + type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.FleetMember or IO :param if_match: Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleets_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleets_operations.py index 1cd3b76b6fb7..8d5181f75da2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleets_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_fleets_operations.py @@ -260,7 +260,7 @@ async def begin_create_or_update( :type resource_group_name: str :param fleet_name: The name of the Fleet resource. Required. :type fleet_name: str - :param parameters: The Fleet to create or update. Is either a model type or a IO type. + :param parameters: The Fleet to create or update. Is either a Fleet type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.Fleet or IO :param if_match: Omit this value to always overwrite the current resource. Specify the @@ -431,8 +431,8 @@ async def update( last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None. :type if_match: str - :param parameters: The properties of a Fleet to update. Is either a model type or a IO type. - Default value is None. + :param parameters: The properties of a Fleet to update. Is either a FleetPatch type or a IO + type. Default value is None. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.FleetPatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_maintenance_configurations_operations.py index 20df65371a3c..41da9fe7f41e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 956afd400f73..183431bed47e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_clusters_operations.py index 2ea864877353..9d79f031b29d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_managed_clusters_operations.py @@ -911,8 +911,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1137,7 +1137,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1498,7 +1498,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1725,8 +1725,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2525,7 +2525,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_07_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_private_endpoint_connections_operations.py index f2f1ee511af0..03485266aec2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 24ef6c6800ef..b26e74375fa3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_snapshots_operations.py index e3eda0768cf8..59c8997d5575 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index f00b9a9e4528..7d166841f378 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_container_service_client_enums.py index daa2d0cb3f88..51be40e698e5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -242,10 +242,10 @@ class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ControlledValues(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Controls which resource value autoscaler will change. Default value is RequestsAndLimits.""" - #: Autoscaler will control resource requests and limits. REQUESTS_AND_LIMITS = "RequestsAndLimits" - #: Autoscaler will control resource requests only. + """Autoscaler will control resource requests and limits.""" REQUESTS_ONLY = "RequestsOnly" + """Autoscaler will control resource requests only.""" class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -273,22 +273,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -322,11 +322,11 @@ class FleetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -361,10 +361,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -372,10 +372,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -384,12 +384,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -414,59 +414,59 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -476,14 +476,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -501,10 +501,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -512,20 +512,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -541,12 +541,12 @@ class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsens class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Allow or deny public network access for AKS.""" - #: Inbound/Outbound to the managedCluster is allowed. ENABLED = "Enabled" - #: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. + """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" - #: Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. + """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -554,16 +554,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -571,11 +571,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -584,31 +584,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -628,17 +628,17 @@ class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): creation (from Initial). The default value is Off. """ - #: Autoscaler never changes pod resources but provides recommendations. OFF = "Off" - #: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime - #: of the pod. + """Autoscaler never changes pod resources but provides recommendations.""" INITIAL = "Initial" - #: Autoscaler assigns resources on pod creation and updates pods that need further scaling during - #: their lifetime by deleting and recreating. + """Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime + #: of the pod.""" RECREATE = "Recreate" - #: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the - #: future, it may take advantage of restart-free mechanisms once they are available. + """Autoscaler assigns resources on pod creation and updates pods that need further scaling during + #: their lifetime by deleting and recreating.""" AUTO = "Auto" + """Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the + #: future, it may take advantage of restart-free mechanisms once they are available.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -646,30 +646,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -687,7 +687,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_models_py3.py index aa5a0604efaf..de78cdab99ed 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -331,8 +331,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -575,8 +575,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -612,8 +612,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -648,7 +648,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_02_preview.models.AgentPool] @@ -708,8 +708,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -746,7 +746,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -773,7 +775,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -818,7 +820,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -863,7 +865,7 @@ class AzureEntityResource(Resource): "etag": {"key": "etag", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.etag = None @@ -906,8 +908,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -966,8 +968,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -1007,7 +1009,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1039,7 +1041,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1150,8 +1152,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1330,8 +1332,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1427,7 +1429,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1456,7 +1458,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1489,7 +1491,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1511,7 +1513,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1542,7 +1544,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1567,7 +1569,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1593,8 +1595,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1634,8 +1636,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1674,7 +1676,7 @@ class ErrorAdditionalInfo(_serialization.Model): "info": {"key": "info", "type": "object"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.type = None @@ -1715,7 +1717,7 @@ class ErrorDetail(_serialization.Model): "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -1726,7 +1728,8 @@ def __init__(self, **kwargs): class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ErrorDetail @@ -1736,7 +1739,7 @@ class ErrorResponse(_serialization.Model): "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. :paramtype error: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ErrorDetail @@ -1765,8 +1768,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1780,7 +1783,8 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1820,7 +1824,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -1892,8 +1896,8 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, hub_profile: Optional["_models.FleetHubProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -1929,7 +1933,7 @@ class FleetCredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1954,7 +1958,7 @@ class FleetCredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[FleetCredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1984,7 +1988,7 @@ class FleetHubProfile(_serialization.Model): "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, } - def __init__(self, *, dns_prefix: Optional[str] = None, **kwargs): + def __init__(self, *, dns_prefix: Optional[str] = None, **kwargs: Any) -> None: """ :keyword dns_prefix: DNS prefix used to create the FQDN for the Fleet hub. :paramtype dns_prefix: str @@ -2015,7 +2019,7 @@ class FleetListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Fleet"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Fleet"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of Fleets. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_02_preview.models.Fleet] @@ -2072,7 +2076,7 @@ class FleetMember(AzureEntityResource): "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__(self, *, cluster_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, cluster_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword cluster_resource_id: The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: @@ -2104,7 +2108,7 @@ class FleetMembersListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.FleetMember"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.FleetMember"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of members in a given Fleet. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_02_preview.models.FleetMember] @@ -2125,7 +2129,7 @@ class FleetPatch(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2135,7 +2139,8 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2205,8 +2210,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2258,7 +2263,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_07_02_preview.models.SysctlConfig @@ -2289,8 +2295,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_07_02_preview.models.SysctlConfig @@ -2314,7 +2320,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -2356,8 +2363,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -2394,7 +2401,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2670,8 +2677,8 @@ def __init__( # pylint: disable=too-many-locals public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2873,8 +2880,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2948,8 +2955,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2989,7 +3001,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -3025,8 +3037,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3064,8 +3076,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3343,8 +3355,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3825,8 +3837,8 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -4082,8 +4094,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -4133,7 +4145,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -4157,7 +4171,9 @@ class ManagedClusterAzureMonitorProfile(_serialization.Model): "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, } - def __init__(self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs): + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: """ :keyword metrics: Metrics profile for the prometheus service addon. :paramtype metrics: @@ -4188,8 +4204,8 @@ def __init__( *, metric_labels_allowlist: Optional[str] = None, metric_annotations_allow_list: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. @@ -4230,8 +4246,8 @@ def __init__( *, enabled: bool, kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable the Prometheus collector. Required. :paramtype enabled: bool @@ -4282,8 +4298,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -4346,8 +4362,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -4379,8 +4395,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -4405,7 +4421,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -4438,7 +4456,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedCluster] @@ -4507,8 +4525,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4568,7 +4586,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4596,7 +4614,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4618,7 +4638,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4644,7 +4664,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4688,8 +4708,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4729,7 +4749,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4787,8 +4807,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4810,7 +4830,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4834,7 +4856,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4850,7 +4872,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4885,8 +4908,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4922,7 +4945,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4963,8 +4988,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4998,7 +5023,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -5044,8 +5071,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -5079,7 +5106,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -5181,8 +5210,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -5284,8 +5313,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -5343,8 +5372,8 @@ def __init__( workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -5402,8 +5431,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -5431,7 +5460,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -5441,7 +5470,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): - """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. + """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce + attack surface area. Here are settings for the security profile. :ivar enabled: Whether to enable ImageCleaner on AKS cluster. :vartype enabled: bool @@ -5454,7 +5484,7 @@ class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): "interval_hours": {"key": "intervalHours", "type": "int"}, } - def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable ImageCleaner on AKS cluster. :paramtype enabled: bool @@ -5477,7 +5507,7 @@ class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Node Restriction. :paramtype enabled: bool @@ -5497,7 +5527,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -5507,7 +5537,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -5526,7 +5557,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -5561,8 +5592,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -5644,8 +5675,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5686,7 +5717,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5728,8 +5759,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5762,7 +5793,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -5785,7 +5816,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5808,7 +5839,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5828,7 +5859,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -5880,8 +5911,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -5953,8 +5984,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -6019,8 +6050,8 @@ def __init__( vertical_pod_autoscaler: Optional[ "_models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -6052,7 +6083,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -6098,8 +6129,8 @@ def __init__( enabled: bool = False, controlled_values: Union[str, "_models.ControlledValues"] = "RequestsAndLimits", update_mode: Union[str, "_models.UpdateMode"] = "Off", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable VPA. Default value is false. Required. :paramtype enabled: bool @@ -6142,7 +6173,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -6189,8 +6220,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -6237,7 +6268,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6280,7 +6311,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -6323,7 +6354,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -6357,7 +6388,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -6390,8 +6421,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -6429,7 +6460,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -6452,7 +6483,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -6473,7 +6504,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -6530,8 +6561,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -6562,7 +6593,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6613,8 +6644,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -6648,7 +6679,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6679,8 +6710,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -6705,7 +6736,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -6737,7 +6768,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -6793,7 +6826,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -6890,8 +6923,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6936,7 +6969,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_07_02_preview.models.Snapshot] @@ -7069,8 +7102,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -7199,8 +7232,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -7239,7 +7272,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7266,8 +7299,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -7296,7 +7333,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -7336,7 +7375,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -7394,7 +7433,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -7430,7 +7469,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -7462,7 +7501,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -7502,7 +7541,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -7539,8 +7578,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_agent_pools_operations.py index 625f1f9de78f..5f50a52b5d90 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_agent_pools_operations.py @@ -826,7 +826,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1235,7 +1235,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleet_members_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleet_members_operations.py index af94a7c3ee2d..6bd63138349a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleet_members_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleet_members_operations.py @@ -464,8 +464,8 @@ def begin_create_or_update( :type fleet_name: str :param fleet_member_name: The name of the Fleet member resource. Required. :type fleet_member_name: str - :param parameters: The Fleet member to create or update. Is either a model type or a IO type. - Required. + :param parameters: The Fleet member to create or update. Is either a FleetMember type or a IO + type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.FleetMember or IO :param if_match: Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleets_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleets_operations.py index ac61a2b58289..e86070d5e29a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleets_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_fleets_operations.py @@ -515,7 +515,7 @@ def begin_create_or_update( :type resource_group_name: str :param fleet_name: The name of the Fleet resource. Required. :type fleet_name: str - :param parameters: The Fleet to create or update. Is either a model type or a IO type. + :param parameters: The Fleet to create or update. Is either a Fleet type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.Fleet or IO :param if_match: Omit this value to always overwrite the current resource. Specify the @@ -686,8 +686,8 @@ def update( last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None. :type if_match: str - :param parameters: The properties of a Fleet to update. Is either a model type or a IO type. - Default value is None. + :param parameters: The properties of a Fleet to update. Is either a FleetPatch type or a IO + type. Default value is None. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.FleetPatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_maintenance_configurations_operations.py index 8c7ed1b1a89c..0e9fc280a17a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_cluster_snapshots_operations.py index c7a3fe1d7e19..e39685276964 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_clusters_operations.py index d51447dc4c9a..47ecec7a9b66 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_managed_clusters_operations.py @@ -1828,8 +1828,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2054,7 +2054,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2415,7 +2415,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2642,8 +2642,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3442,7 +3442,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_07_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_private_endpoint_connections_operations.py index 41b18b23509a..41d4b106c915 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_resolve_private_link_service_id_operations.py index b040da075a37..ecae4df20d8d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_snapshots_operations.py index f4777e79bbf9..0f27c143e13b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_trusted_access_role_bindings_operations.py index a0ed93243724..c1dfaf476dfc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -505,8 +505,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_07_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_container_service_client.py index 96df9fdfa075..8fd89d0cd5cd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_container_service_client.py @@ -155,5 +155,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_metadata.json index d7cef5b9601e..700d3b824e05 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/_container_service_client.py index 5fc8bb76a59d..b3fa3f77cbd2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/_container_service_client.py @@ -155,5 +155,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_agent_pools_operations.py index d986b862759d..0c9c3bd879e7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_agent_pools_operations.py @@ -480,7 +480,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -890,7 +890,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_maintenance_configurations_operations.py index 7f391dd3c672..26e4e120f5fa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index ef25a2386151..b119281a4950 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_clusters_operations.py index 8b079cc9f706..73d8fe3262e1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_managed_clusters_operations.py @@ -911,8 +911,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1137,7 +1137,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1494,7 +1494,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1717,8 +1717,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2497,7 +2497,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_08_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_private_endpoint_connections_operations.py index a8ad628b815f..6d5219be07d4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 7a4cae72f702..f3c565660ff6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_snapshots_operations.py index 45e956e9de8a..d878534deb89 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index d286bde5a1ee..62aee622e98b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_container_service_client_enums.py index 657b61d1424d..1838f5aa905c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_container_service_client_enums.py @@ -16,41 +16,41 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the managed inbound Load Balancer BackendPool.""" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. NODE_IP_CONFIGURATION = "NodeIPConfiguration" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" NODE_IP = "NodeIP" + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -253,10 +253,10 @@ class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ControlledValues(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Controls which resource value autoscaler will change. Default value is RequestsAndLimits.""" - #: Autoscaler will control resource requests and limits. REQUESTS_AND_LIMITS = "RequestsAndLimits" - #: Autoscaler will control resource requests only. + """Autoscaler will control resource requests and limits.""" REQUESTS_ONLY = "RequestsOnly" + """Autoscaler will control resource requests only.""" class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -284,22 +284,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -311,11 +311,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -340,10 +340,10 @@ class IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): http://www.linuxvirtualserver.org/docs/scheduling.html. """ - #: Round Robin ROUND_ROBIN = "RoundRobin" - #: Least Connection + """Round Robin""" LEAST_CONNECTION = "LeastConnection" + """Least Connection""" class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -361,10 +361,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -382,10 +382,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -394,12 +394,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -422,68 +422,68 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specify which proxy mode to use ('IPTABLES' or 'IPVS').""" - #: IPTables proxy mode IPTABLES = "IPTABLES" - #: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + """IPTables proxy mode""" IPVS = "IPVS" + """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -493,14 +493,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -519,10 +519,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -530,20 +530,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -558,12 +558,12 @@ class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsens class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Allow or deny public network access for AKS.""" - #: Inbound/Outbound to the managedCluster is allowed. ENABLED = "Enabled" - #: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. + """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" - #: Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. + """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -571,16 +571,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -588,11 +588,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -601,31 +601,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -644,17 +644,17 @@ class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): creation (from Initial). The default value is Off. """ - #: Autoscaler never changes pod resources but provides recommendations. OFF = "Off" - #: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime - #: of the pod. + """Autoscaler never changes pod resources but provides recommendations.""" INITIAL = "Initial" - #: Autoscaler assigns resources on pod creation and updates pods that need further scaling during - #: their lifetime by deleting and recreating. + """Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime + #: of the pod.""" RECREATE = "Recreate" - #: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the - #: future, it may take advantage of restart-free mechanisms once they are available. + """Autoscaler assigns resources on pod creation and updates pods that need further scaling during + #: their lifetime by deleting and recreating.""" AUTO = "Auto" + """Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the + #: future, it may take advantage of restart-free mechanisms once they are available.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -662,30 +662,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -703,7 +703,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_models_py3.py index 305e6eb3ea75..dfe49e3b68c0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -336,8 +336,8 @@ def __init__( # pylint: disable=too-many-locals capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -584,8 +584,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -621,8 +621,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -657,7 +657,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_08_02_preview.models.AgentPool] @@ -717,8 +717,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -755,7 +755,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -782,7 +784,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -808,7 +810,7 @@ class AgentPoolWindowsProfile(_serialization.Model): "disable_outbound_nat": {"key": "disableOutboundNat", "type": "bool"}, } - def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs): + def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword disable_outbound_nat: The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP @@ -856,8 +858,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -916,8 +918,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -957,7 +959,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -989,7 +991,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1100,8 +1102,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1289,8 +1291,8 @@ def __init__( service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1376,7 +1378,11 @@ def __init__( class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.Model): - """Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where :code:`` is represented by a :code:``-:code:`` string. Kubernetes version 1.23 would be '1-23'. + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1402,8 +1408,8 @@ def __init__( enabled: Optional[bool] = None, mode: Optional[Union[str, "_models.Mode"]] = None, ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1455,8 +1461,8 @@ def __init__( tcp_timeout_seconds: Optional[int] = None, tcp_fin_timeout_seconds: Optional[int] = None, udp_timeout_seconds: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scheduler: IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and @@ -1499,7 +1505,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1528,7 +1534,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1561,7 +1567,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1583,7 +1589,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1614,7 +1620,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1639,7 +1645,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1665,8 +1671,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1706,8 +1712,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1745,8 +1751,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1798,8 +1804,8 @@ def __init__( version: str, level: Union[str, "_models.Level"], excluded_namespaces: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword version: The version of constraints to use. Required. :paramtype version: str @@ -1818,7 +1824,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1888,8 +1895,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1941,7 +1948,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_08_02_preview.models.SysctlConfig @@ -1972,8 +1980,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_08_02_preview.models.SysctlConfig @@ -1997,7 +2005,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -2039,8 +2048,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -2077,7 +2086,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2120,7 +2129,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -2130,7 +2139,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -2170,7 +2180,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2453,8 +2463,8 @@ def __init__( # pylint: disable=too-many-locals workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, guardrails_profile: Optional["_models.GuardrailsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2661,8 +2671,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2736,8 +2746,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2777,7 +2792,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2813,8 +2828,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2852,8 +2867,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3136,8 +3151,8 @@ def __init__( # pylint: disable=too-many-locals capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3627,8 +3642,8 @@ def __init__( # pylint: disable=too-many-locals capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3888,8 +3903,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3939,7 +3954,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3963,7 +3980,9 @@ class ManagedClusterAzureMonitorProfile(_serialization.Model): "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, } - def __init__(self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs): + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: """ :keyword metrics: Metrics profile for the prometheus service addon. :paramtype metrics: @@ -3994,8 +4013,8 @@ def __init__( *, metric_labels_allowlist: Optional[str] = None, metric_annotations_allow_list: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. @@ -4036,8 +4055,8 @@ def __init__( *, enabled: bool, kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable the Prometheus collector. Required. :paramtype enabled: bool @@ -4088,8 +4107,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -4152,8 +4171,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -4185,8 +4204,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -4211,7 +4230,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -4244,7 +4265,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedCluster] @@ -4319,8 +4340,8 @@ def __init__( idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Union[str, "_models.BackendPoolType"] = "NodeIPConfiguration", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4385,7 +4406,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4413,7 +4434,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4435,7 +4458,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4461,7 +4484,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4505,8 +4528,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4546,7 +4569,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4604,8 +4627,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4627,7 +4650,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4651,7 +4676,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4667,7 +4692,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4702,8 +4728,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4739,7 +4765,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4780,8 +4808,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4815,7 +4843,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4861,8 +4891,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4896,7 +4926,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4998,8 +5030,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -5101,8 +5133,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -5160,8 +5192,8 @@ def __init__( workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -5219,8 +5251,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -5248,7 +5280,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -5258,7 +5290,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): - """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. + """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce + attack surface area. Here are settings for the security profile. :ivar enabled: Whether to enable ImageCleaner on AKS cluster. :vartype enabled: bool @@ -5271,7 +5304,7 @@ class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): "interval_hours": {"key": "intervalHours", "type": "int"}, } - def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable ImageCleaner on AKS cluster. :paramtype enabled: bool @@ -5294,7 +5327,7 @@ class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Node Restriction. :paramtype enabled: bool @@ -5314,7 +5347,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -5324,7 +5357,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -5343,7 +5377,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -5378,8 +5412,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -5461,8 +5495,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5503,7 +5537,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5545,8 +5579,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5579,7 +5613,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -5602,7 +5636,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5625,7 +5659,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5645,7 +5679,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -5697,8 +5731,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -5770,8 +5804,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -5836,8 +5870,8 @@ def __init__( vertical_pod_autoscaler: Optional[ "_models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -5869,7 +5903,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -5915,8 +5949,8 @@ def __init__( enabled: bool = False, controlled_values: Union[str, "_models.ControlledValues"] = "RequestsAndLimits", update_mode: Union[str, "_models.UpdateMode"] = "Off", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable VPA. Default value is false. Required. :paramtype enabled: bool @@ -5959,7 +5993,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -6006,8 +6040,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -6054,7 +6088,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6097,7 +6131,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -6140,7 +6174,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -6174,7 +6208,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -6207,8 +6241,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -6246,7 +6280,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -6269,7 +6303,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -6290,7 +6324,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -6347,8 +6381,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -6379,7 +6413,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6430,8 +6464,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -6465,7 +6499,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6496,8 +6530,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -6522,7 +6556,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -6554,7 +6588,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -6610,7 +6646,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -6707,8 +6743,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6753,7 +6789,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_08_02_preview.models.Snapshot] @@ -6886,8 +6922,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -7016,8 +7052,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -7056,7 +7092,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7083,8 +7119,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -7113,7 +7153,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -7153,7 +7195,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -7211,7 +7253,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -7247,7 +7289,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -7279,7 +7321,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -7319,7 +7361,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -7356,8 +7398,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_agent_pools_operations.py index c07cc8782ff9..02e048835724 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_agent_pools_operations.py @@ -826,7 +826,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1235,7 +1235,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_maintenance_configurations_operations.py index 149d91e879b3..9686d66972af 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_cluster_snapshots_operations.py index 9c9bd92787bf..fda40de5d1c1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_clusters_operations.py index 5f782c938c79..686017ba4ce7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_managed_clusters_operations.py @@ -1828,8 +1828,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2054,7 +2054,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2411,7 +2411,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2634,8 +2634,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3414,7 +3414,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_08_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_private_endpoint_connections_operations.py index 922f1a272094..3ed32b7450a7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_resolve_private_link_service_id_operations.py index 94c662b703a6..64168f1c8cba 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_snapshots_operations.py index 57ec08f71d4a..00956179e0df 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_trusted_access_role_bindings_operations.py index b26eb6b5afad..4f16c3cdead3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -505,8 +505,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_08_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_container_service_client.py index 642d20cedac3..f8265fe72935 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_container_service_client.py @@ -155,5 +155,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_metadata.json index 13a33aec325b..fce6f31e4294 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/_container_service_client.py index 74ea75a38765..e2a9b23fe7c6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/_container_service_client.py @@ -155,5 +155,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_agent_pools_operations.py index 6dc1f4b8889a..c6d85a3ddc5f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_agent_pools_operations.py @@ -480,7 +480,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -890,7 +890,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_maintenance_configurations_operations.py index e4f6c68238a5..8dd59a4f8d8a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_cluster_snapshots_operations.py index d1444fd84161..c5619bca855f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_clusters_operations.py index e79475e920fb..643c3f8eaa4f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_managed_clusters_operations.py @@ -911,8 +911,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1137,7 +1137,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1494,7 +1494,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1717,8 +1717,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2497,7 +2497,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_08_03_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_private_endpoint_connections_operations.py index 598493dc9daa..379de09d59db 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_resolve_private_link_service_id_operations.py index 0a777c9e933e..c98673c41c31 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_snapshots_operations.py index 34d7e8895a98..e857c5c53637 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_trusted_access_role_bindings_operations.py index 54b035a36188..d0cf31b567d9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_container_service_client_enums.py index 657b61d1424d..1838f5aa905c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_container_service_client_enums.py @@ -16,41 +16,41 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the managed inbound Load Balancer BackendPool.""" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. NODE_IP_CONFIGURATION = "NodeIPConfiguration" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" NODE_IP = "NodeIP" + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -253,10 +253,10 @@ class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ControlledValues(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Controls which resource value autoscaler will change. Default value is RequestsAndLimits.""" - #: Autoscaler will control resource requests and limits. REQUESTS_AND_LIMITS = "RequestsAndLimits" - #: Autoscaler will control resource requests only. + """Autoscaler will control resource requests and limits.""" REQUESTS_ONLY = "RequestsOnly" + """Autoscaler will control resource requests only.""" class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -284,22 +284,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -311,11 +311,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -340,10 +340,10 @@ class IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): http://www.linuxvirtualserver.org/docs/scheduling.html. """ - #: Round Robin ROUND_ROBIN = "RoundRobin" - #: Least Connection + """Round Robin""" LEAST_CONNECTION = "LeastConnection" + """Least Connection""" class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -361,10 +361,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -382,10 +382,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -394,12 +394,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -422,68 +422,68 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specify which proxy mode to use ('IPTABLES' or 'IPVS').""" - #: IPTables proxy mode IPTABLES = "IPTABLES" - #: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + """IPTables proxy mode""" IPVS = "IPVS" + """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -493,14 +493,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -519,10 +519,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -530,20 +530,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -558,12 +558,12 @@ class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsens class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Allow or deny public network access for AKS.""" - #: Inbound/Outbound to the managedCluster is allowed. ENABLED = "Enabled" - #: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. + """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" - #: Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. + """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -571,16 +571,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -588,11 +588,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -601,31 +601,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -644,17 +644,17 @@ class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): creation (from Initial). The default value is Off. """ - #: Autoscaler never changes pod resources but provides recommendations. OFF = "Off" - #: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime - #: of the pod. + """Autoscaler never changes pod resources but provides recommendations.""" INITIAL = "Initial" - #: Autoscaler assigns resources on pod creation and updates pods that need further scaling during - #: their lifetime by deleting and recreating. + """Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime + #: of the pod.""" RECREATE = "Recreate" - #: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the - #: future, it may take advantage of restart-free mechanisms once they are available. + """Autoscaler assigns resources on pod creation and updates pods that need further scaling during + #: their lifetime by deleting and recreating.""" AUTO = "Auto" + """Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the + #: future, it may take advantage of restart-free mechanisms once they are available.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -662,30 +662,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -703,7 +703,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_models_py3.py index 22f6e0ac7304..b312f841060a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -341,8 +341,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -593,8 +593,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -630,8 +630,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -666,7 +666,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_08_03_preview.models.AgentPool] @@ -688,7 +688,7 @@ class AgentPoolNetworkProfile(_serialization.Model): "node_public_ip_tags": {"key": "nodePublicIPTags", "type": "[IPTag]"}, } - def __init__(self, *, node_public_ip_tags: Optional[List["_models.IPTag"]] = None, **kwargs): + def __init__(self, *, node_public_ip_tags: Optional[List["_models.IPTag"]] = None, **kwargs: Any) -> None: """ :keyword node_public_ip_tags: IPTags of instance-level public IPs. :paramtype node_public_ip_tags: @@ -748,8 +748,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -786,7 +786,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -813,7 +815,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -839,7 +841,7 @@ class AgentPoolWindowsProfile(_serialization.Model): "disable_outbound_nat": {"key": "disableOutboundNat", "type": "bool"}, } - def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs): + def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword disable_outbound_nat: The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP @@ -887,8 +889,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -947,8 +949,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -988,7 +990,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1020,7 +1022,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1131,8 +1133,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1320,8 +1322,8 @@ def __init__( service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1407,7 +1409,11 @@ def __init__( class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.Model): - """Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where :code:`` is represented by a :code:``-:code:`` string. Kubernetes version 1.23 would be '1-23'. + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1433,8 +1439,8 @@ def __init__( enabled: Optional[bool] = None, mode: Optional[Union[str, "_models.Mode"]] = None, ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1486,8 +1492,8 @@ def __init__( tcp_timeout_seconds: Optional[int] = None, tcp_fin_timeout_seconds: Optional[int] = None, udp_timeout_seconds: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scheduler: IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and @@ -1530,7 +1536,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1559,7 +1565,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1592,7 +1598,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1614,7 +1620,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1645,7 +1651,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1670,7 +1676,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1696,8 +1702,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1737,8 +1743,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1776,8 +1782,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1829,8 +1835,8 @@ def __init__( version: str, level: Union[str, "_models.Level"], excluded_namespaces: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword version: The version of constraints to use. Required. :paramtype version: str @@ -1862,7 +1868,7 @@ class IPTag(_serialization.Model): "tag": {"key": "tag", "type": "str"}, } - def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs): + def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs: Any) -> None: """ :keyword ip_tag_type: The IP tag type. Example: RoutingPreference. :paramtype ip_tag_type: str @@ -1875,7 +1881,8 @@ def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = No class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1945,8 +1952,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1998,7 +2005,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_08_03_preview.models.SysctlConfig @@ -2029,8 +2037,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_08_03_preview.models.SysctlConfig @@ -2054,7 +2062,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -2096,8 +2105,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -2134,7 +2143,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2177,7 +2186,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -2187,7 +2196,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -2227,7 +2237,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2510,8 +2520,8 @@ def __init__( # pylint: disable=too-many-locals workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, guardrails_profile: Optional["_models.GuardrailsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2718,8 +2728,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2793,8 +2803,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2834,7 +2849,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2870,8 +2885,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2909,8 +2924,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3198,8 +3213,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3698,8 +3713,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3963,8 +3978,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -4014,7 +4029,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -4038,7 +4055,9 @@ class ManagedClusterAzureMonitorProfile(_serialization.Model): "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, } - def __init__(self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs): + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: """ :keyword metrics: Metrics profile for the prometheus service addon. :paramtype metrics: @@ -4069,8 +4088,8 @@ def __init__( *, metric_labels_allowlist: Optional[str] = None, metric_annotations_allow_list: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. @@ -4111,8 +4130,8 @@ def __init__( *, enabled: bool, kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable the Prometheus collector. Required. :paramtype enabled: bool @@ -4163,8 +4182,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -4227,8 +4246,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -4260,8 +4279,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -4286,7 +4305,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -4319,7 +4340,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedCluster] @@ -4394,8 +4415,8 @@ def __init__( idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Union[str, "_models.BackendPoolType"] = "NodeIPConfiguration", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4460,7 +4481,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4488,7 +4509,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4510,7 +4533,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4536,7 +4559,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4580,8 +4603,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4621,7 +4644,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4679,8 +4702,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4702,7 +4725,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4726,7 +4751,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4742,7 +4767,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4777,8 +4803,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4814,7 +4840,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4855,8 +4883,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4890,7 +4918,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4936,8 +4966,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4971,7 +5001,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -5073,8 +5105,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -5176,8 +5208,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -5235,8 +5267,8 @@ def __init__( workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -5294,8 +5326,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -5323,7 +5355,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -5333,7 +5365,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): - """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. + """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce + attack surface area. Here are settings for the security profile. :ivar enabled: Whether to enable ImageCleaner on AKS cluster. :vartype enabled: bool @@ -5346,7 +5379,7 @@ class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): "interval_hours": {"key": "intervalHours", "type": "int"}, } - def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable ImageCleaner on AKS cluster. :paramtype enabled: bool @@ -5369,7 +5402,7 @@ class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Node Restriction. :paramtype enabled: bool @@ -5389,7 +5422,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -5399,7 +5432,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -5418,7 +5452,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -5453,8 +5487,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -5536,8 +5570,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5578,7 +5612,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5620,8 +5654,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5654,7 +5688,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -5677,7 +5711,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5700,7 +5734,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5720,7 +5754,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -5772,8 +5806,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -5845,8 +5879,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -5911,8 +5945,8 @@ def __init__( vertical_pod_autoscaler: Optional[ "_models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -5944,7 +5978,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -5990,8 +6024,8 @@ def __init__( enabled: bool = False, controlled_values: Union[str, "_models.ControlledValues"] = "RequestsAndLimits", update_mode: Union[str, "_models.UpdateMode"] = "Off", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable VPA. Default value is false. Required. :paramtype enabled: bool @@ -6034,7 +6068,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -6081,8 +6115,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -6129,7 +6163,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6172,7 +6206,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -6215,7 +6249,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -6249,7 +6283,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -6282,8 +6316,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -6321,7 +6355,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -6344,7 +6378,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -6365,7 +6399,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -6422,8 +6456,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -6454,7 +6488,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6505,8 +6539,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -6540,7 +6574,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6571,8 +6605,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -6597,7 +6631,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -6629,7 +6663,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -6685,7 +6721,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -6782,8 +6818,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6828,7 +6864,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_08_03_preview.models.Snapshot] @@ -6961,8 +6997,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -7091,8 +7127,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -7131,7 +7167,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7158,8 +7194,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -7188,7 +7228,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -7228,7 +7270,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -7286,7 +7328,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -7322,7 +7364,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -7354,7 +7396,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -7394,7 +7436,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -7431,8 +7473,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_agent_pools_operations.py index 7fbd91891922..b1e2320ba27c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_agent_pools_operations.py @@ -826,7 +826,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1235,7 +1235,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_maintenance_configurations_operations.py index a91067084715..db8e3c892f3d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_cluster_snapshots_operations.py index 853f362b37b0..dacfe64a3e01 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_clusters_operations.py index fd71b133bdc1..5192ae8a42b4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_managed_clusters_operations.py @@ -1828,8 +1828,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2054,7 +2054,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2411,7 +2411,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2634,8 +2634,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3414,7 +3414,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_08_03_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_private_endpoint_connections_operations.py index 06285e423880..3fa863134d65 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_resolve_private_link_service_id_operations.py index e2b4a5f0643c..ec54575c9e8c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_snapshots_operations.py index d28e3c5f312f..d8eb28687674 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_trusted_access_role_bindings_operations.py index 8dbb725cf943..8c85f8669428 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_08_03_preview/operations/_trusted_access_role_bindings_operations.py @@ -505,8 +505,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_08_03_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_container_service_client.py index cd67e9db8fe1..27168a4bec16 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_container_service_client.py @@ -132,5 +132,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_metadata.json index d9db5ce3488d..fce3efcc4ba7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/_container_service_client.py index 8739d28aa54f..1e4938b3d776 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/_container_service_client.py @@ -133,5 +133,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_agent_pools_operations.py index e7ec39bf1a36..d4a6dbbf268a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_agent_pools_operations.py @@ -403,7 +403,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -786,7 +786,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_maintenance_configurations_operations.py index 164ed6eccec5..00afabf9acda 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_managed_clusters_operations.py index 3758da65e721..c04f56aadad7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_managed_clusters_operations.py @@ -890,8 +890,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1112,7 +1112,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1446,7 +1446,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1663,8 +1663,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2361,7 +2361,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_09_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_private_endpoint_connections_operations.py index 2afca1ed5431..8bf8aae9f189 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_private_endpoint_connections_operations.py @@ -283,8 +283,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_resolve_private_link_service_id_operations.py index 760aa72bbd3c..c9a45ea238e0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_snapshots_operations.py index 801a8685207c..58cf2596c217 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/aio/operations/_snapshots_operations.py @@ -371,7 +371,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_container_service_client_enums.py index beb07820f4a6..3698a3da75d6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -330,10 +330,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -341,10 +341,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -353,12 +353,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -381,51 +381,51 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: No CNI plugin is pre-installed. See `BYO CNI - #: `_ for more information. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """No CNI plugin is pre-installed. See `BYO CNI + #: `_ for more information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -435,14 +435,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -460,10 +460,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -471,20 +471,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -508,16 +508,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -525,11 +525,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -538,29 +538,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -568,30 +568,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -609,7 +609,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_models_py3.py index ee2eeb314bbc..6373817c44f5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -312,8 +312,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -539,8 +539,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -576,8 +576,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -612,7 +612,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_01.models.AgentPool] @@ -672,8 +672,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -710,7 +710,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -737,7 +739,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -787,8 +789,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -847,8 +849,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -887,7 +889,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -918,7 +920,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1029,8 +1031,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1198,8 +1200,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1285,7 +1287,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1314,7 +1316,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1347,7 +1349,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1369,7 +1371,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1400,7 +1402,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1424,7 +1426,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1449,8 +1451,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1490,8 +1492,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1528,8 +1530,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1542,7 +1544,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1612,8 +1615,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1665,7 +1668,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_09_01.models.SysctlConfig @@ -1696,8 +1700,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_09_01.models.SysctlConfig @@ -1721,7 +1725,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1762,8 +1767,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1797,7 +1802,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1840,7 +1845,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1850,7 +1855,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1890,7 +1896,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2140,8 +2146,8 @@ def __init__( # pylint: disable=too-many-locals security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2323,8 +2329,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2398,8 +2404,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2439,7 +2450,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2475,8 +2486,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2514,8 +2525,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2774,8 +2785,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3220,8 +3231,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3450,8 +3461,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3492,7 +3503,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3531,8 +3544,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3593,8 +3606,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3632,7 +3645,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_01.models.ManagedCluster] @@ -3701,8 +3714,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3762,7 +3775,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3790,7 +3803,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3811,7 +3826,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_09_01.models.ResourceReference] @@ -3836,7 +3851,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3880,8 +3895,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3921,7 +3936,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -3979,8 +3994,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4001,7 +4016,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4025,7 +4042,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4041,7 +4058,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4076,8 +4094,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4113,7 +4131,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4154,8 +4174,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4189,7 +4209,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4235,8 +4257,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4270,7 +4292,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4372,8 +4396,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4464,8 +4488,8 @@ def __init__( *, defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -4508,8 +4532,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -4537,7 +4561,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -4547,7 +4571,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4566,7 +4591,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4599,8 +4624,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_09_01.models.ManagedClusterSKUName @@ -4645,8 +4670,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -4679,7 +4704,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -4699,7 +4724,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -4719,7 +4744,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -4739,7 +4764,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -4791,8 +4816,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4862,8 +4887,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4920,7 +4945,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -4944,7 +4969,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4987,7 +5012,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -5030,7 +5055,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -5064,7 +5089,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5096,8 +5121,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5134,7 +5159,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5157,7 +5182,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5178,7 +5203,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5234,8 +5259,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_09_01.models.PrivateEndpoint @@ -5264,7 +5289,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5315,8 +5340,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5349,7 +5374,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_01.models.PrivateLinkResource] @@ -5378,8 +5403,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5403,7 +5428,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5435,7 +5460,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5491,7 +5518,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5586,8 +5613,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5630,7 +5657,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_01.models.Snapshot] @@ -5763,8 +5790,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5892,8 +5919,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5932,7 +5959,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5959,8 +5986,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -5989,7 +6020,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -6028,8 +6061,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_agent_pools_operations.py index 76c0bb859b84..6b58c18e6ecf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_agent_pools_operations.py @@ -682,7 +682,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1064,7 +1064,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_maintenance_configurations_operations.py index ef409bd1e4cd..751270191089 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_managed_clusters_operations.py index 3dccb517d1a2..2df0242d95af 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_managed_clusters_operations.py @@ -1715,8 +1715,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1937,7 +1937,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2271,7 +2271,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2488,8 +2488,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3186,7 +3186,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_09_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_private_endpoint_connections_operations.py index b04a155bdc85..0a0c8e2ed7ca 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_private_endpoint_connections_operations.py @@ -465,8 +465,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_resolve_private_link_service_id_operations.py index cd49e5e33b58..188d5e0a784f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_resolve_private_link_service_id_operations.py @@ -179,7 +179,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_snapshots_operations.py index d4894e161dbb..6aea12cc8459 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_01/operations/_snapshots_operations.py @@ -582,7 +582,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -729,8 +729,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_container_service_client.py index 4a399fa4ca6d..0bfff0e03d4a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_container_service_client.py @@ -164,5 +164,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_metadata.json index b38697b5841a..943f28de1148 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/_container_service_client.py index 4ae0bdf67b50..a54915232124 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/_container_service_client.py @@ -165,5 +165,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_agent_pools_operations.py index 47b25c9b8c7b..82e33bd3d6c1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_agent_pools_operations.py @@ -480,7 +480,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -890,7 +890,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleet_members_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleet_members_operations.py index f0440e34af60..dab156258088 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleet_members_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleet_members_operations.py @@ -273,8 +273,8 @@ async def begin_create_or_update( :type fleet_name: str :param fleet_member_name: The name of the Fleet member resource. Required. :type fleet_member_name: str - :param parameters: The Fleet member to create or update. Is either a model type or a IO type. - Required. + :param parameters: The Fleet member to create or update. Is either a FleetMember type or a IO + type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.FleetMember or IO :param if_match: Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleets_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleets_operations.py index 4bd7c639c40e..10ddd2433ce9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleets_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_fleets_operations.py @@ -260,7 +260,7 @@ async def begin_create_or_update( :type resource_group_name: str :param fleet_name: The name of the Fleet resource. Required. :type fleet_name: str - :param parameters: The Fleet to create or update. Is either a model type or a IO type. + :param parameters: The Fleet to create or update. Is either a Fleet type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.Fleet or IO :param if_match: Omit this value to always overwrite the current resource. Specify the @@ -434,8 +434,8 @@ async def update( last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None. :type if_match: str - :param parameters: The properties of a Fleet to update. Is either a model type or a IO type. - Default value is None. + :param parameters: The properties of a Fleet to update. Is either a FleetPatch type or a IO + type. Default value is None. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.FleetPatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_maintenance_configurations_operations.py index 7ad8827a88f7..7103dfb562a7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 1f8e506c958e..7b864e83941f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_clusters_operations.py index fe15db335ff4..b8c223df3a9e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_managed_clusters_operations.py @@ -911,8 +911,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1137,7 +1137,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1494,7 +1494,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1717,8 +1717,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2497,7 +2497,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_09_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_private_endpoint_connections_operations.py index 8ea8fe50217f..bf3ea35f8868 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 7f126d7c336d..616d14d1a7c5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_snapshots_operations.py index f60b32a7cad1..8f311a36be08 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index 0369b4b4a9ef..6cb1d52589d9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_container_service_client_enums.py index 2de08ee1cf2c..0dc383035def 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_container_service_client_enums.py @@ -16,41 +16,41 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the managed inbound Load Balancer BackendPool.""" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. NODE_IP_CONFIGURATION = "NodeIPConfiguration" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" NODE_IP = "NodeIP" + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -253,10 +253,10 @@ class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ControlledValues(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Controls which resource value autoscaler will change. Default value is RequestsAndLimits.""" - #: Autoscaler will control resource requests and limits. REQUESTS_AND_LIMITS = "RequestsAndLimits" - #: Autoscaler will control resource requests only. + """Autoscaler will control resource requests and limits.""" REQUESTS_ONLY = "RequestsOnly" + """Autoscaler will control resource requests only.""" class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -281,8 +281,8 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class EbpfDataplane(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The eBPF dataplane used for building the Kubernetes network.""" - #: Use Cilium for networking in the Kubernetes cluster. CILIUM = "cilium" + """Use Cilium for networking in the Kubernetes cluster.""" class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,22 +291,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -340,11 +340,11 @@ class FleetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -369,10 +369,10 @@ class IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): http://www.linuxvirtualserver.org/docs/scheduling.html. """ - #: Round Robin ROUND_ROBIN = "RoundRobin" - #: Least Connection + """Round Robin""" LEAST_CONNECTION = "LeastConnection" + """Least Connection""" class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -390,10 +390,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -411,10 +411,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -423,12 +423,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -451,68 +451,68 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specify which proxy mode to use ('IPTABLES' or 'IPVS').""" - #: IPTables proxy mode IPTABLES = "IPTABLES" - #: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + """IPTables proxy mode""" IPVS = "IPVS" + """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -522,14 +522,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -548,10 +548,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -559,20 +559,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -587,21 +587,21 @@ class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsens class Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The network protocol of the port.""" - #: TCP protocol. TCP = "TCP" - #: UDP protocol. + """TCP protocol.""" UDP = "UDP" + """UDP protocol.""" class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Allow or deny public network access for AKS.""" - #: Inbound/Outbound to the managedCluster is allowed. ENABLED = "Enabled" - #: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. + """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" - #: Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. + """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -609,16 +609,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -626,11 +626,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -639,31 +639,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -682,17 +682,17 @@ class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): creation (from Initial). The default value is Off. """ - #: Autoscaler never changes pod resources but provides recommendations. OFF = "Off" - #: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime - #: of the pod. + """Autoscaler never changes pod resources but provides recommendations.""" INITIAL = "Initial" - #: Autoscaler assigns resources on pod creation and updates pods that need further scaling during - #: their lifetime by deleting and recreating. + """Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime + #: of the pod.""" RECREATE = "Recreate" - #: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the - #: future, it may take advantage of restart-free mechanisms once they are available. + """Autoscaler assigns resources on pod creation and updates pods that need further scaling during + #: their lifetime by deleting and recreating.""" AUTO = "Auto" + """Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the + #: future, it may take advantage of restart-free mechanisms once they are available.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -700,30 +700,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -741,7 +741,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_models_py3.py index bfe14ec00ec0..87650ddf21e7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -342,8 +342,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -595,8 +595,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -632,8 +632,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -668,7 +668,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_02_preview.models.AgentPool] @@ -705,8 +705,8 @@ def __init__( node_public_ip_tags: Optional[List["_models.IPTag"]] = None, allowed_host_ports: Optional[List["_models.PortRange"]] = None, application_security_groups: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword node_public_ip_tags: IPTags of instance-level public IPs. :paramtype node_public_ip_tags: @@ -775,8 +775,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -813,7 +813,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -840,7 +842,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -866,7 +868,7 @@ class AgentPoolWindowsProfile(_serialization.Model): "disable_outbound_nat": {"key": "disableOutboundNat", "type": "bool"}, } - def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs): + def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword disable_outbound_nat: The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP @@ -909,7 +911,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -954,7 +956,7 @@ class AzureEntityResource(Resource): "etag": {"key": "etag", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.etag = None @@ -997,8 +999,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -1057,8 +1059,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -1098,7 +1100,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1130,7 +1132,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1241,8 +1243,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1435,8 +1437,8 @@ def __init__( service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1526,7 +1528,11 @@ def __init__( class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.Model): - """Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where :code:`` is represented by a :code:``-:code:`` string. Kubernetes version 1.23 would be '1-23'. + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1552,8 +1558,8 @@ def __init__( enabled: Optional[bool] = None, mode: Optional[Union[str, "_models.Mode"]] = None, ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1605,8 +1611,8 @@ def __init__( tcp_timeout_seconds: Optional[int] = None, tcp_fin_timeout_seconds: Optional[int] = None, udp_timeout_seconds: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scheduler: IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and @@ -1649,7 +1655,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1678,7 +1684,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1711,7 +1717,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1733,7 +1739,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1764,7 +1770,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1789,7 +1795,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1815,8 +1821,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1856,8 +1862,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1896,7 +1902,7 @@ class ErrorAdditionalInfo(_serialization.Model): "info": {"key": "info", "type": "object"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.type = None @@ -1937,7 +1943,7 @@ class ErrorDetail(_serialization.Model): "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -1948,7 +1954,8 @@ def __init__(self, **kwargs): class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ErrorDetail @@ -1958,7 +1965,7 @@ class ErrorResponse(_serialization.Model): "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. :paramtype error: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ErrorDetail @@ -1987,8 +1994,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -2002,7 +2009,8 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -2042,7 +2050,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2114,8 +2122,8 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, hub_profile: Optional["_models.FleetHubProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2151,7 +2159,7 @@ class FleetCredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -2176,7 +2184,7 @@ class FleetCredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[FleetCredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -2211,7 +2219,7 @@ class FleetHubProfile(_serialization.Model): "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, } - def __init__(self, *, dns_prefix: Optional[str] = None, **kwargs): + def __init__(self, *, dns_prefix: Optional[str] = None, **kwargs: Any) -> None: """ :keyword dns_prefix: DNS prefix used to create the FQDN for the Fleet hub. :paramtype dns_prefix: str @@ -2242,7 +2250,7 @@ class FleetListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Fleet"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Fleet"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of Fleets. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_02_preview.models.Fleet] @@ -2299,7 +2307,7 @@ class FleetMember(AzureEntityResource): "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__(self, *, cluster_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, cluster_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword cluster_resource_id: The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: @@ -2331,7 +2339,7 @@ class FleetMembersListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.FleetMember"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.FleetMember"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of members in a given Fleet. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_02_preview.models.FleetMember] @@ -2352,7 +2360,7 @@ class FleetPatch(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2400,8 +2408,8 @@ def __init__( version: str, level: Union[str, "_models.Level"], excluded_namespaces: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword version: The version of constraints to use. Required. :paramtype version: str @@ -2433,7 +2441,7 @@ class IPTag(_serialization.Model): "tag": {"key": "tag", "type": "str"}, } - def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs): + def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs: Any) -> None: """ :keyword ip_tag_type: The IP tag type. Example: RoutingPreference. :paramtype ip_tag_type: str @@ -2446,7 +2454,8 @@ def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = No class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2516,8 +2525,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2569,7 +2578,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_09_02_preview.models.SysctlConfig @@ -2600,8 +2610,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_09_02_preview.models.SysctlConfig @@ -2625,7 +2635,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -2667,8 +2678,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -2705,7 +2716,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2808,7 +2819,7 @@ class ManagedCluster(TrackedResource): # pylint: disable=too-many-instance-attr aka.ms/aks/azpodpolicy. :vartype enable_pod_security_policy: bool :ivar enable_namespace_resources: The default value is false. It can be enabled/disabled on - creation and updation of the managed cluster. See `https://aka.ms/NamespaceARMResource + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource `_ for more details on Namespace as a ARM Resource. :vartype enable_namespace_resources: bool :ivar network_profile: The network configuration profile. @@ -2987,8 +2998,8 @@ def __init__( # pylint: disable=too-many-locals workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, guardrails_profile: Optional["_models.GuardrailsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -3048,7 +3059,7 @@ def __init__( # pylint: disable=too-many-locals aka.ms/aks/azpodpolicy. :paramtype enable_pod_security_policy: bool :keyword enable_namespace_resources: The default value is false. It can be enabled/disabled on - creation and updation of the managed cluster. See `https://aka.ms/NamespaceARMResource + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource `_ for more details on Namespace as a ARM Resource. :paramtype enable_namespace_resources: bool :keyword network_profile: The network configuration profile. @@ -3195,8 +3206,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -3270,8 +3281,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -3311,7 +3327,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -3347,8 +3363,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3386,8 +3402,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3676,8 +3692,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -4178,8 +4194,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -4444,8 +4460,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -4495,7 +4511,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -4519,7 +4537,9 @@ class ManagedClusterAzureMonitorProfile(_serialization.Model): "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, } - def __init__(self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs): + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: """ :keyword metrics: Metrics profile for the prometheus service addon. :paramtype metrics: @@ -4550,8 +4570,8 @@ def __init__( *, metric_labels_allowlist: Optional[str] = None, metric_annotations_allow_list: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. @@ -4592,8 +4612,8 @@ def __init__( *, enabled: bool, kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable the Prometheus collector. Required. :paramtype enabled: bool @@ -4644,8 +4664,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -4708,8 +4728,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -4741,8 +4761,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -4767,7 +4787,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -4800,7 +4822,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedCluster] @@ -4875,8 +4897,8 @@ def __init__( idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Union[str, "_models.BackendPoolType"] = "NodeIPConfiguration", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4941,7 +4963,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4969,7 +4991,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4991,7 +5015,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -5017,7 +5041,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -5061,8 +5085,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -5102,7 +5126,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -5160,8 +5184,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -5183,7 +5207,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -5207,7 +5233,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -5223,7 +5249,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -5258,8 +5285,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -5295,7 +5322,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -5336,8 +5365,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -5371,7 +5400,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -5417,8 +5448,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -5452,7 +5483,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -5554,8 +5587,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -5657,8 +5690,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -5727,8 +5760,8 @@ def __init__( image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, custom_ca_trust_certificates: Optional[List[bytes]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -5792,8 +5825,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -5821,7 +5854,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -5831,7 +5864,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): - """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. + """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce + attack surface area. Here are settings for the security profile. :ivar enabled: Whether to enable ImageCleaner on AKS cluster. :vartype enabled: bool @@ -5844,7 +5878,7 @@ class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): "interval_hours": {"key": "intervalHours", "type": "int"}, } - def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable ImageCleaner on AKS cluster. :paramtype enabled: bool @@ -5867,7 +5901,7 @@ class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Node Restriction. :paramtype enabled: bool @@ -5887,7 +5921,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -5897,7 +5931,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -5916,7 +5951,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -5951,8 +5986,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -6034,8 +6069,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6076,7 +6111,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -6118,8 +6153,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -6152,7 +6187,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -6175,7 +6210,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -6198,7 +6233,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -6218,7 +6253,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -6270,8 +6305,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -6343,8 +6378,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -6409,8 +6444,8 @@ def __init__( vertical_pod_autoscaler: Optional[ "_models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -6442,7 +6477,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -6488,8 +6523,8 @@ def __init__( enabled: bool = False, controlled_values: Union[str, "_models.ControlledValues"] = "RequestsAndLimits", update_mode: Union[str, "_models.UpdateMode"] = "Off", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable VPA. Default value is false. Required. :paramtype enabled: bool @@ -6532,7 +6567,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -6579,8 +6614,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -6627,7 +6662,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6670,7 +6705,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -6713,7 +6748,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -6747,7 +6782,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -6780,8 +6815,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -6819,7 +6854,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -6860,8 +6895,8 @@ def __init__( port_start: Optional[int] = None, port_end: Optional[int] = None, protocol: Optional[Union[str, "_models.Protocol"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword port_start: The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. @@ -6890,7 +6925,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -6911,7 +6946,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -6968,8 +7003,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -7000,7 +7035,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -7051,8 +7086,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -7086,7 +7121,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -7117,8 +7152,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -7143,7 +7178,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -7175,7 +7210,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -7231,7 +7268,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -7328,8 +7365,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7374,7 +7411,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_09_02_preview.models.Snapshot] @@ -7507,8 +7544,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -7637,8 +7674,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -7677,7 +7714,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7704,8 +7741,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -7734,7 +7775,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -7774,7 +7817,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -7832,7 +7875,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -7868,7 +7911,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -7900,7 +7943,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -7940,7 +7983,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -7977,8 +8020,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_agent_pools_operations.py index e51ab677517d..27ef5bd7920b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_agent_pools_operations.py @@ -826,7 +826,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1235,7 +1235,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleet_members_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleet_members_operations.py index 80daf4361469..ef839d9433fe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleet_members_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleet_members_operations.py @@ -464,8 +464,8 @@ def begin_create_or_update( :type fleet_name: str :param fleet_member_name: The name of the Fleet member resource. Required. :type fleet_member_name: str - :param parameters: The Fleet member to create or update. Is either a model type or a IO type. - Required. + :param parameters: The Fleet member to create or update. Is either a FleetMember type or a IO + type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.FleetMember or IO :param if_match: Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleets_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleets_operations.py index dea4a803b1f9..32891532aa1d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleets_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_fleets_operations.py @@ -515,7 +515,7 @@ def begin_create_or_update( :type resource_group_name: str :param fleet_name: The name of the Fleet resource. Required. :type fleet_name: str - :param parameters: The Fleet to create or update. Is either a model type or a IO type. + :param parameters: The Fleet to create or update. Is either a Fleet type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.Fleet or IO :param if_match: Omit this value to always overwrite the current resource. Specify the @@ -688,8 +688,8 @@ def update( last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None. :type if_match: str - :param parameters: The properties of a Fleet to update. Is either a model type or a IO type. - Default value is None. + :param parameters: The properties of a Fleet to update. Is either a FleetPatch type or a IO + type. Default value is None. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.FleetPatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_maintenance_configurations_operations.py index 5e9d76950a34..175a7732335c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_cluster_snapshots_operations.py index afd48db9cb43..5bd8f2a6c32c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_clusters_operations.py index f993c0facbdd..5f1c233fb6ca 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_managed_clusters_operations.py @@ -1828,8 +1828,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2054,7 +2054,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2411,7 +2411,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2634,8 +2634,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3414,7 +3414,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_09_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_private_endpoint_connections_operations.py index a41f5475fd2a..7b614005dd5a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_resolve_private_link_service_id_operations.py index a71b89adc323..e18088ea75eb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_snapshots_operations.py index da3f2acaf0f8..e082d7c59a06 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_trusted_access_role_bindings_operations.py index 9fc5502fca17..cd6452bb7d43 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_09_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -505,8 +505,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_09_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_container_service_client.py index 8e108723c56c..6d75da717ea7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_container_service_client.py @@ -155,5 +155,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_metadata.json index 0e861e2c2705..4a2bfedf850d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/_container_service_client.py index 75c2ac282f9f..486ca4e38220 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/_container_service_client.py @@ -155,5 +155,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_agent_pools_operations.py index 8111fde9e710..9f251f0a5344 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_agent_pools_operations.py @@ -543,7 +543,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -957,7 +957,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_maintenance_configurations_operations.py index f3c8c86caf08..ab4bfc7f65c9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index bce9833b3156..ec49f8116315 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_clusters_operations.py index 50eef3305156..6a483f5f7e46 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_managed_clusters_operations.py @@ -911,8 +911,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1137,7 +1137,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1502,7 +1502,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1731,8 +1731,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2603,7 +2603,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_10_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_private_endpoint_connections_operations.py index cd4123f3e27b..8fdff4d35e93 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 2c249c8753cc..4e1acb39d394 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_snapshots_operations.py index cd576d09d30b..2f355b42eb96 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index f1480a02a7f9..ccd8191f1e61 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_container_service_client_enums.py index f8fd9a5c7e8f..f469df8471d9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_container_service_client_enums.py @@ -16,41 +16,41 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the managed inbound Load Balancer BackendPool.""" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. NODE_IP_CONFIGURATION = "NodeIPConfiguration" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" NODE_IP = "NodeIP" + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -253,10 +253,10 @@ class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ControlledValues(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Controls which resource value autoscaler will change. Default value is RequestsAndLimits.""" - #: Autoscaler will control resource requests and limits. REQUESTS_AND_LIMITS = "RequestsAndLimits" - #: Autoscaler will control resource requests only. + """Autoscaler will control resource requests and limits.""" REQUESTS_ONLY = "RequestsOnly" + """Autoscaler will control resource requests only.""" class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -281,8 +281,8 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class EbpfDataplane(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The eBPF dataplane used for building the Kubernetes network.""" - #: Use Cilium for networking in the Kubernetes cluster. CILIUM = "cilium" + """Use Cilium for networking in the Kubernetes cluster.""" class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,22 +291,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -318,11 +318,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully - #: removed in 1.25. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in 1.22 and will be fully + #: removed in 1.25.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -347,10 +347,10 @@ class IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): http://www.linuxvirtualserver.org/docs/scheduling.html. """ - #: Round Robin ROUND_ROBIN = "RoundRobin" - #: Least Connection + """Round Robin""" LEAST_CONNECTION = "LeastConnection" + """Least Connection""" class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -368,10 +368,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -389,10 +389,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -401,12 +401,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -431,95 +431,95 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specify which proxy mode to use ('IPTABLES' or 'IPVS').""" - #: IPTables proxy mode IPTABLES = "IPTABLES" - #: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + """IPTables proxy mode""" IPVS = "IPVS" + """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA.""" - #: No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means - #: you are responsible for your security updates NONE = "None" - #: OS updates will be applied automatically through the OS built-in patching infrastructure. Newly + """No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means + #: you are responsible for your security updates""" + UNMANAGED = "Unmanaged" + """OS updates will be applied automatically through the OS built-in patching infrastructure. Newly #: scaled in machines will be unpatched initially, and will be patched at some later time by the #: OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner #: apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows #: does not apply security patches automatically and so for them this option is equivalent to None - #: till further notice - UNMANAGED = "Unmanaged" - #: AKS will update the nodes VHD with patches from the image maintainer labelled "security only" + #: till further notice""" + SECURITY_PATCH = "SecurityPatch" + """AKS will update the nodes VHD with patches from the image maintainer labelled "security only" #: on a regular basis. Where possible, patches will also be applied without reimaging to existing #: nodes. Some patches, such as kernel patches, cannot be applied to existing nodes without #: disruption. For such patches, the VHD will be updated, and machines will be rolling reimaged to #: that VHD following maintenance windows and surge settings. This option incurs the extra cost of - #: hosting the VHDs in your node resource group. - SECURITY_PATCH = "SecurityPatch" - #: AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a + #: hosting the VHDs in your node resource group.""" + NODE_IMAGE = "NodeImage" + """AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a #: weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following #: maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option - #: as AKS hosts the images. - NODE_IMAGE = "NodeImage" + #: as AKS hosts the images.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -529,14 +529,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -555,10 +555,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -566,20 +566,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -595,21 +595,21 @@ class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsens class Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The network protocol of the port.""" - #: TCP protocol. TCP = "TCP" - #: UDP protocol. + """TCP protocol.""" UDP = "UDP" + """UDP protocol.""" class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Allow or deny public network access for AKS.""" - #: Inbound/Outbound to the managedCluster is allowed. ENABLED = "Enabled" - #: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. + """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" - #: Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. + """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -617,16 +617,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -634,11 +634,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -647,31 +647,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -687,16 +687,16 @@ class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensi class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs.""" - #: First. FIRST = "First" - #: Second. + """First.""" SECOND = "Second" - #: Third. + """Second.""" THIRD = "Third" - #: Fourth. + """Third.""" FOURTH = "Fourth" - #: Last. + """Fourth.""" LAST = "Last" + """Last.""" class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -706,17 +706,17 @@ class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): creation (from Initial). The default value is Off. """ - #: Autoscaler never changes pod resources but provides recommendations. OFF = "Off" - #: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime - #: of the pod. + """Autoscaler never changes pod resources but provides recommendations.""" INITIAL = "Initial" - #: Autoscaler assigns resources on pod creation and updates pods that need further scaling during - #: their lifetime by deleting and recreating. + """Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime + #: of the pod.""" RECREATE = "Recreate" - #: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the - #: future, it may take advantage of restart-free mechanisms once they are available. + """Autoscaler assigns resources on pod creation and updates pods that need further scaling during + #: their lifetime by deleting and recreating.""" AUTO = "Auto" + """Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the + #: future, it may take advantage of restart-free mechanisms once they are available.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -724,29 +724,29 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Consider using - #: nodeOSUpgradeChannel instead as that allows you to configure node OS patching separate from - #: Kubernetes version patching + #: upgraded to 1.17.9.""" NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + """Automatically upgrade the node image to the latest version available. Consider using + #: nodeOSUpgradeChannel instead as that allows you to configure node OS patching separate from + #: Kubernetes version patching""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -764,7 +764,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_models_py3.py index e2ca8165437f..10ba9f249fea 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -39,7 +39,7 @@ class AbsoluteMonthlySchedule(_serialization.Model): "day_of_month": {"key": "dayOfMonth", "type": "int"}, } - def __init__(self, *, interval_months: int, day_of_month: int, **kwargs): + def __init__(self, *, interval_months: int, day_of_month: int, **kwargs: Any) -> None: """ :keyword interval_months: Specifies the number of months between each set of occurrences. Required. @@ -78,7 +78,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -377,8 +377,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -630,8 +630,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -667,8 +667,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -703,7 +703,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_10_02_preview.models.AgentPool] @@ -740,8 +740,8 @@ def __init__( node_public_ip_tags: Optional[List["_models.IPTag"]] = None, allowed_host_ports: Optional[List["_models.PortRange"]] = None, application_security_groups: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword node_public_ip_tags: IPTags of instance-level public IPs. :paramtype node_public_ip_tags: @@ -810,8 +810,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -848,7 +848,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -875,7 +877,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -901,7 +903,7 @@ class AgentPoolWindowsProfile(_serialization.Model): "disable_outbound_nat": {"key": "disableOutboundNat", "type": "bool"}, } - def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs): + def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword disable_outbound_nat: The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP @@ -949,8 +951,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -1009,8 +1011,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -1050,7 +1052,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1082,7 +1084,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1193,8 +1195,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1387,8 +1389,8 @@ def __init__( service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1478,7 +1480,11 @@ def __init__( class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.Model): - """Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where :code:`` is represented by a :code:``-:code:`` string. Kubernetes version 1.23 would be '1-23'. + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1504,8 +1510,8 @@ def __init__( enabled: Optional[bool] = None, mode: Optional[Union[str, "_models.Mode"]] = None, ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1557,8 +1563,8 @@ def __init__( tcp_timeout_seconds: Optional[int] = None, tcp_fin_timeout_seconds: Optional[int] = None, udp_timeout_seconds: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scheduler: IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and @@ -1601,7 +1607,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1630,7 +1636,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1663,7 +1669,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1685,7 +1691,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1716,7 +1722,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1741,7 +1747,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1764,7 +1770,7 @@ class DailySchedule(_serialization.Model): "interval_days": {"key": "intervalDays", "type": "int"}, } - def __init__(self, *, interval_days: int, **kwargs): + def __init__(self, *, interval_days: int, **kwargs: Any) -> None: """ :keyword interval_days: Specifies the number of days between each set of occurrences. Required. :paramtype interval_days: int @@ -1794,7 +1800,7 @@ class DateSpan(_serialization.Model): "end": {"key": "end", "type": "date"}, } - def __init__(self, *, start: datetime.date, end: datetime.date, **kwargs): + def __init__(self, *, start: datetime.date, end: datetime.date, **kwargs: Any) -> None: """ :keyword start: The start date of the date span. Required. :paramtype start: ~datetime.date @@ -1826,8 +1832,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1867,8 +1873,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1906,8 +1912,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1959,8 +1965,8 @@ def __init__( version: str, level: Union[str, "_models.Level"], excluded_namespaces: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword version: The version of constraints to use. Required. :paramtype version: str @@ -1992,7 +1998,7 @@ class IPTag(_serialization.Model): "tag": {"key": "tag", "type": "str"}, } - def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs): + def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs: Any) -> None: """ :keyword ip_tag_type: The IP tag type. Example: RoutingPreference. :paramtype ip_tag_type: str @@ -2005,7 +2011,8 @@ def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = No class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2075,8 +2082,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2128,7 +2135,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_10_02_preview.models.SysctlConfig @@ -2159,8 +2167,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_10_02_preview.models.SysctlConfig @@ -2184,7 +2192,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -2231,8 +2240,8 @@ def __init__( time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, maintenance_window: Optional["_models.MaintenanceWindow"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -2273,7 +2282,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2337,8 +2346,8 @@ def __init__( utc_offset: Optional[str] = None, start_date: Optional[datetime.date] = None, not_allowed_dates: Optional[List["_models.DateSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword schedule: Recurrence schedule for the maintenance window. Required. :paramtype schedule: ~azure.mgmt.containerservice.v2022_10_02_preview.models.Schedule @@ -2403,7 +2412,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -2413,7 +2422,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -2453,7 +2463,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2557,7 +2567,7 @@ class ManagedCluster(TrackedResource): # pylint: disable=too-many-instance-attr aka.ms/aks/azpodpolicy. :vartype enable_pod_security_policy: bool :ivar enable_namespace_resources: The default value is false. It can be enabled/disabled on - creation and updation of the managed cluster. See `https://aka.ms/NamespaceARMResource + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource `_ for more details on Namespace as a ARM Resource. :vartype enable_namespace_resources: bool :ivar network_profile: The network configuration profile. @@ -2736,8 +2746,8 @@ def __init__( # pylint: disable=too-many-locals workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, guardrails_profile: Optional["_models.GuardrailsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2797,7 +2807,7 @@ def __init__( # pylint: disable=too-many-locals aka.ms/aks/azpodpolicy. :paramtype enable_pod_security_policy: bool :keyword enable_namespace_resources: The default value is false. It can be enabled/disabled on - creation and updation of the managed cluster. See `https://aka.ms/NamespaceARMResource + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource `_ for more details on Namespace as a ARM Resource. :paramtype enable_namespace_resources: bool :keyword network_profile: The network configuration profile. @@ -2944,8 +2954,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -3019,8 +3029,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -3060,7 +3075,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -3096,8 +3111,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3135,8 +3150,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3425,8 +3440,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3927,8 +3942,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -4193,8 +4208,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -4254,8 +4269,8 @@ def __init__( *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, node_os_upgrade_channel: Optional[Union[str, "_models.NodeOSUpgradeChannel"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -4285,7 +4300,9 @@ class ManagedClusterAzureMonitorProfile(_serialization.Model): "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, } - def __init__(self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs): + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: """ :keyword metrics: Metrics profile for the prometheus service addon. :paramtype metrics: @@ -4316,8 +4333,8 @@ def __init__( *, metric_labels_allowlist: Optional[str] = None, metric_annotations_allow_list: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. @@ -4358,8 +4375,8 @@ def __init__( *, enabled: bool, kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable the Prometheus collector. Required. :paramtype enabled: bool @@ -4410,8 +4427,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -4474,8 +4491,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -4507,8 +4524,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -4533,7 +4550,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -4566,7 +4585,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedCluster] @@ -4641,8 +4660,8 @@ def __init__( idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Union[str, "_models.BackendPoolType"] = "NodeIPConfiguration", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4707,7 +4726,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4735,7 +4754,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4757,7 +4778,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4783,7 +4804,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4827,8 +4848,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4868,7 +4889,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4926,8 +4947,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4949,7 +4970,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4973,7 +4996,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4989,7 +5012,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -5024,8 +5048,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -5061,7 +5085,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -5102,8 +5128,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -5137,7 +5163,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -5183,8 +5211,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -5218,7 +5246,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -5320,8 +5350,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -5423,8 +5453,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -5493,8 +5523,8 @@ def __init__( image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, custom_ca_trust_certificates: Optional[List[bytes]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -5558,8 +5588,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -5587,7 +5617,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -5597,7 +5627,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): - """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. + """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce + attack surface area. Here are settings for the security profile. :ivar enabled: Whether to enable ImageCleaner on AKS cluster. :vartype enabled: bool @@ -5610,7 +5641,7 @@ class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): "interval_hours": {"key": "intervalHours", "type": "int"}, } - def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable ImageCleaner on AKS cluster. :paramtype enabled: bool @@ -5633,7 +5664,7 @@ class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Node Restriction. :paramtype enabled: bool @@ -5653,7 +5684,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -5663,7 +5694,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -5682,7 +5714,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -5717,8 +5749,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -5800,8 +5832,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5842,7 +5874,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5884,8 +5916,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5918,7 +5950,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -5941,7 +5973,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5964,7 +5996,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -5984,7 +6016,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -6036,8 +6068,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -6109,8 +6141,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -6175,8 +6207,8 @@ def __init__( vertical_pod_autoscaler: Optional[ "_models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -6208,7 +6240,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -6254,8 +6286,8 @@ def __init__( enabled: bool = False, controlled_values: Union[str, "_models.ControlledValues"] = "RequestsAndLimits", update_mode: Union[str, "_models.UpdateMode"] = "Off", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable VPA. Default value is false. Required. :paramtype enabled: bool @@ -6298,7 +6330,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -6345,8 +6377,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -6393,7 +6425,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6436,7 +6468,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -6479,7 +6511,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -6513,7 +6545,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -6546,8 +6578,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -6585,7 +6617,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -6626,8 +6658,8 @@ def __init__( port_start: Optional[int] = None, port_end: Optional[int] = None, protocol: Optional[Union[str, "_models.Protocol"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword port_start: The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. @@ -6656,7 +6688,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -6677,7 +6709,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -6734,8 +6766,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -6766,7 +6798,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6817,8 +6849,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -6852,7 +6884,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6883,8 +6915,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -6899,7 +6931,8 @@ def __init__( class RelativeMonthlySchedule(_serialization.Model): - """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last + Friday'. All required parameters must be populated in order to send to Azure. @@ -6933,8 +6966,8 @@ def __init__( interval_months: int, week_index: Union[str, "_models.Type"], day_of_week: Union[str, "_models.WeekDay"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword interval_months: Specifies the number of months between each set of occurrences. Required. @@ -6965,7 +6998,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -6997,7 +7030,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -7053,7 +7088,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -7066,7 +7101,8 @@ def __init__(self, **kwargs): class Schedule(_serialization.Model): - """One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' for your maintenance schedule. + """One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', + 'absoluteMonthly' or 'relativeMonthly' for your maintenance schedule. :ivar daily: For schedules like: 'recur every day' or 'recur every 3 days'. :vartype daily: ~azure.mgmt.containerservice.v2022_10_02_preview.models.DailySchedule @@ -7096,8 +7132,8 @@ def __init__( weekly: Optional["_models.WeeklySchedule"] = None, absolute_monthly: Optional["_models.AbsoluteMonthlySchedule"] = None, relative_monthly: Optional["_models.RelativeMonthlySchedule"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword daily: For schedules like: 'recur every day' or 'recur every 3 days'. :paramtype daily: ~azure.mgmt.containerservice.v2022_10_02_preview.models.DailySchedule @@ -7205,8 +7241,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7251,7 +7287,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_10_02_preview.models.Snapshot] @@ -7384,8 +7420,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -7514,8 +7550,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -7554,7 +7590,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7581,8 +7617,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -7611,7 +7651,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -7651,7 +7693,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -7709,7 +7751,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -7745,7 +7787,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -7777,7 +7819,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -7817,7 +7859,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -7849,7 +7891,7 @@ class WeeklySchedule(_serialization.Model): "day_of_week": {"key": "dayOfWeek", "type": "str"}, } - def __init__(self, *, interval_weeks: int, day_of_week: Union[str, "_models.WeekDay"], **kwargs): + def __init__(self, *, interval_weeks: int, day_of_week: Union[str, "_models.WeekDay"], **kwargs: Any) -> None: """ :keyword interval_weeks: Specifies the number of weeks between each set of occurrences. Required. @@ -7891,8 +7933,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_agent_pools_operations.py index 8640b539de15..106a4ec65739 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_agent_pools_operations.py @@ -897,7 +897,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1310,7 +1310,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_maintenance_configurations_operations.py index 47a2abbc592d..e20f06c5d54c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_cluster_snapshots_operations.py index 32eea3238d77..2fa0f597ad26 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_clusters_operations.py index aae96cc7d974..e0238678f5ae 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_managed_clusters_operations.py @@ -1828,8 +1828,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2054,7 +2054,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2419,7 +2419,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2648,8 +2648,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3520,7 +3520,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_10_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_private_endpoint_connections_operations.py index 6d86634e1843..9b3f65528a0f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_resolve_private_link_service_id_operations.py index 56bef5e10271..a0f4b5c8f17a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_snapshots_operations.py index dd6a3ab4a170..4bcbdab70ae7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_trusted_access_role_bindings_operations.py index 887b38b30517..6b8ca3352cbb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_10_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -520,8 +520,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_10_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_container_service_client.py index 91bb17143f17..47c55c0fb21f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_container_service_client.py @@ -132,5 +132,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_metadata.json index b1f74dad41cd..fce9a8c2a651 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/_container_service_client.py index 2c7c93b1ff71..d875a5d21fd2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/_container_service_client.py @@ -133,5 +133,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_agent_pools_operations.py index 96b20ed268b0..f15cd8583485 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_agent_pools_operations.py @@ -403,7 +403,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -790,7 +790,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_maintenance_configurations_operations.py index 7d249651d1fe..50a60c02e127 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_maintenance_configurations_operations.py @@ -311,8 +311,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_managed_clusters_operations.py index 36fd105f4a5c..3287efde64c1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_managed_clusters_operations.py @@ -890,8 +890,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1112,7 +1112,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1454,7 +1454,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1677,8 +1677,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2399,7 +2399,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_11_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_private_endpoint_connections_operations.py index b579f04718c4..57f41a7c2f8d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_private_endpoint_connections_operations.py @@ -283,8 +283,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_resolve_private_link_service_id_operations.py index 2c0fd29932c4..a0f3b89760b4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_snapshots_operations.py index 444a8a715e1a..4d9e5c2bd19c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/aio/operations/_snapshots_operations.py @@ -371,7 +371,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -518,8 +518,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_container_service_client_enums.py index 6ef02149d793..d01d6b4365ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_container_service_client_enums.py @@ -16,30 +16,30 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -264,22 +264,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,11 +291,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully - #: removed in v1.26. See: https://aka.ms/k8s/changes-1-26. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully + #: removed in v1.26. See: https://aka.ms/k8s/changes-1-26.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -330,10 +330,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -341,10 +341,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -353,12 +353,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -383,51 +383,51 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: No CNI plugin is pre-installed. See `BYO CNI - #: `_ for more information. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """No CNI plugin is pre-installed. See `BYO CNI + #: `_ for more information.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -437,14 +437,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -462,10 +462,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -473,20 +473,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -511,16 +511,16 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -528,11 +528,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -541,29 +541,29 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -571,30 +571,30 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides #: patches and new images for image nodes frequently (usually weekly), but your running nodes #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel - #: will automatically update your node images whenever a new version is available. - NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + #: will automatically update your node images whenever a new version is available.""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -612,7 +612,7 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_models_py3.py index 05f953475ffd..9a6468916374 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -43,7 +43,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -312,8 +312,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -539,8 +539,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -576,8 +576,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -612,7 +612,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_11_01.models.AgentPool] @@ -672,8 +672,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -710,7 +710,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -737,7 +739,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -787,8 +789,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -847,8 +849,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -887,7 +889,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -918,7 +920,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1029,8 +1031,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1198,8 +1200,8 @@ def __init__( pod_cidrs: Optional[List[str]] = None, service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1285,7 +1287,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1314,7 +1316,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1347,7 +1349,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1369,7 +1371,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1400,7 +1402,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1424,7 +1426,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1449,8 +1451,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1490,8 +1492,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1528,8 +1530,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1542,7 +1544,8 @@ def __init__( class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1612,8 +1615,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -1665,7 +1668,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_11_01.models.SysctlConfig @@ -1696,8 +1700,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_11_01.models.SysctlConfig @@ -1721,7 +1725,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -1762,8 +1767,8 @@ def __init__( *, time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -1797,7 +1802,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -1840,7 +1845,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1850,7 +1855,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1890,7 +1896,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2148,8 +2154,8 @@ def __init__( # pylint: disable=too-many-locals storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2335,8 +2341,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -2410,8 +2416,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2451,7 +2462,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -2487,8 +2498,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2526,8 +2537,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -2786,8 +2797,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3232,8 +3243,8 @@ def __init__( # pylint: disable=too-many-locals gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, creation_data: Optional["_models.CreationData"] = None, host_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3462,8 +3473,8 @@ def __init__( private_dns_zone: Optional[str] = None, enable_private_cluster_public_fqdn: Optional[bool] = None, disable_run_command: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -3504,7 +3515,9 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, } - def __init__(self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs): + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -3543,8 +3556,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -3605,8 +3618,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -3644,7 +3657,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_11_01.models.ManagedCluster] @@ -3713,8 +3726,8 @@ def __init__( allocated_outbound_ports: int = 0, idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -3774,7 +3787,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -3802,7 +3815,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -3823,7 +3838,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2022_11_01.models.ResourceReference] @@ -3848,7 +3863,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -3892,8 +3907,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -3933,7 +3948,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -3991,8 +4006,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4013,7 +4028,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -4037,7 +4054,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -4053,7 +4070,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -4088,8 +4106,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -4125,7 +4143,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -4166,8 +4186,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -4201,7 +4221,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -4247,8 +4269,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -4282,7 +4304,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -4384,8 +4408,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -4476,8 +4500,8 @@ def __init__( *, defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -4520,8 +4544,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -4549,7 +4573,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -4559,7 +4583,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -4578,7 +4603,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -4611,8 +4636,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or ~azure.mgmt.containerservice.v2022_11_01.models.ManagedClusterSKUName @@ -4657,8 +4682,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -4691,7 +4716,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -4711,7 +4736,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -4731,7 +4756,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -4751,7 +4776,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -4803,8 +4828,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -4874,8 +4899,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -4924,7 +4949,9 @@ class ManagedClusterWorkloadAutoScalerProfile(_serialization.Model): "keda": {"key": "keda", "type": "ManagedClusterWorkloadAutoScalerProfileKeda"}, } - def __init__(self, *, keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, **kwargs): + def __init__( + self, *, keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -4952,7 +4979,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -4982,7 +5009,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -5006,7 +5033,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5049,7 +5076,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -5092,7 +5119,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -5126,7 +5153,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -5158,8 +5185,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -5196,7 +5223,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -5219,7 +5246,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -5240,7 +5267,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -5296,8 +5323,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: ~azure.mgmt.containerservice.v2022_11_01.models.PrivateEndpoint @@ -5326,7 +5353,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -5377,8 +5404,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -5411,7 +5438,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: list[~azure.mgmt.containerservice.v2022_11_01.models.PrivateLinkResource] @@ -5440,8 +5467,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -5465,7 +5492,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -5497,7 +5524,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -5553,7 +5582,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -5648,8 +5677,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5692,7 +5721,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_11_01.models.Snapshot] @@ -5825,8 +5854,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -5954,8 +5983,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -5994,7 +6023,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6021,8 +6050,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -6051,7 +6084,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -6090,8 +6125,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_agent_pools_operations.py index 483f44ae83f0..f65dad8ce4d8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_agent_pools_operations.py @@ -688,7 +688,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1074,7 +1074,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_maintenance_configurations_operations.py index 010d3fc57a5e..2248375eaa51 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_maintenance_configurations_operations.py @@ -474,8 +474,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_managed_clusters_operations.py index 37e5edfd9035..37a0719863c4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_managed_clusters_operations.py @@ -1715,8 +1715,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1937,7 +1937,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2279,7 +2279,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.ManagedClusterServicePrincipalProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2502,8 +2502,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3224,7 +3224,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_11_01.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_private_endpoint_connections_operations.py index 874e88f1dca5..10c68bde4848 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_private_endpoint_connections_operations.py @@ -465,8 +465,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_resolve_private_link_service_id_operations.py index 11677b6afda5..4712271df136 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_resolve_private_link_service_id_operations.py @@ -179,7 +179,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_snapshots_operations.py index 524f503147ca..ceac94a5772f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_01/operations/_snapshots_operations.py @@ -582,7 +582,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -729,8 +729,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_01.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_container_service_client.py index 9ff745d4f0ca..16210dc5fc37 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_container_service_client.py @@ -155,5 +155,5 @@ def __enter__(self) -> "ContainerServiceClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_metadata.json index 011bfe56ff0d..491945c75fb8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_metadata.json @@ -19,13 +19,15 @@ "signature": "credential: \"TokenCredential\",", "description": "Credential needed for the client to connect to Azure. Required.", "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true + "required": true, + "method_location": "positional" }, "subscription_id": { "signature": "subscription_id: str,", "description": "The ID of the target subscription. Required.", "docstring_type": "str", - "required": true + "required": true, + "method_location": "positional" } }, "async": { @@ -51,19 +53,22 @@ "signature": "api_version: Optional[str]=None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles=KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } }, "async": { @@ -71,19 +76,22 @@ "signature": "api_version: Optional[str] = None,", "description": "API version to use if no profile is provided, or if missing in profile.", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "base_url": { "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", - "required": false + "required": false, + "method_location": "positional" }, "profile": { "signature": "profile: KnownProfiles = KnownProfiles.default,", "description": "A profile definition, from KnownProfiles to dict.", "docstring_type": "azure.profiles.KnownProfiles", - "required": false + "required": false, + "method_location": "positional" } } } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_vendor.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_version.py index a012ac01c480..e5754a47ce68 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "21.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/_container_service_client.py index 0841911bbfc8..e224d5c17813 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/_container_service_client.py @@ -155,5 +155,5 @@ async def __aenter__(self) -> "ContainerServiceClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_agent_pools_operations.py index 7f9e1ed2ef50..fc33a36be062 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_agent_pools_operations.py @@ -543,7 +543,7 @@ async def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -957,7 +957,7 @@ async def _upgrade_node_image_version_initial( @distributed_trace_async async def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_maintenance_configurations_operations.py index 9e6133acbe99..eb4c37037622 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index 96f0e70c1b3a..6c535cef3471 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -388,8 +388,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -541,7 +541,7 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_clusters_operations.py index dd4f6b26cc10..b9f170f4ef93 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_managed_clusters_operations.py @@ -911,8 +911,8 @@ async def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1137,7 +1137,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1502,7 +1502,7 @@ async def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -1731,8 +1731,8 @@ async def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2603,7 +2603,8 @@ async def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_11_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_private_endpoint_connections_operations.py index 85fd6c17b224..506e512294f9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -289,8 +289,8 @@ async def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index d45b36056c8e..40acb962d0f4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -133,7 +133,7 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_snapshots_operations.py index 7f008bbd36b5..f37ff2fa42a3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_snapshots_operations.py @@ -377,7 +377,7 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -526,8 +526,8 @@ async def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index 80fa8aa74f8a..1047f5cb1417 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -316,8 +316,8 @@ async def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_container_service_client_enums.py index d3fa0a429bb2..7a82d8a691d7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_container_service_client_enums.py @@ -16,41 +16,41 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://docs.microsoft.com/azure/aks/use-system-pools. """ - #: System agent pools are primarily for hosting critical system pods such as CoreDNS and - #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at - #: least 2vCPUs and 4GB of memory. SYSTEM = "System" - #: User agent pools are primarily for hosting your application pods. + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" USER = "User" + """User agent pools are primarily for hosting your application pods.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of Agent Pool.""" - #: Create an Agent Pool backed by a Virtual Machine Scale Set. VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" - #: Use of this is strongly discouraged. + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the managed inbound Load Balancer BackendPool.""" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. NODE_IP_CONFIGURATION = "NodeIPConfiguration" - #: The type of the managed inbound Load Balancer BackendPool. - #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" NODE_IP = "NodeIP" + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" - #: The cluster is running. RUNNING = "Running" - #: The cluster is stopped. + """The cluster is running.""" STOPPED = "Stopped" + """The cluster is stopped.""" class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -253,10 +253,10 @@ class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ControlledValues(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Controls which resource value autoscaler will change. Default value is RequestsAndLimits.""" - #: Autoscaler will control resource requests and limits. REQUESTS_AND_LIMITS = "RequestsAndLimits" - #: Autoscaler will control resource requests only. + """Autoscaler will control resource requests and limits.""" REQUESTS_ONLY = "RequestsOnly" + """Autoscaler will control resource requests only.""" class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -281,8 +281,8 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class EbpfDataplane(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The eBPF dataplane used for building the Kubernetes network.""" - #: Use Cilium for networking in the Kubernetes cluster. CILIUM = "cilium" + """Use Cilium for networking in the Kubernetes cluster.""" class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,22 +291,22 @@ class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): for more information. """ - #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or #: high memory nodes, and only want to expand those when there are pending pods that need a lot of - #: those resources. - LEAST_WASTE = "least-waste" - #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple - #: smaller nodes at once. - MOST_PODS = "most-pods" - #: Selects the node group that has the highest priority assigned by the user. It's configuration - #: is described in more details `here - #: `_. + #: smaller nodes at once.""" PRIORITY = "priority" - #: Used when you don't have a particular need for the node groups to scale differently. + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -318,11 +318,11 @@ class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Format.""" - #: Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully - #: removed in v1.26. See: https://aka.ms/k8s/changes-1-26. AZURE = "azure" - #: Return exec format kubeconfig. This format requires kubelogin binary in the path. + """Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully + #: removed in v1.26. See: https://aka.ms/k8s/changes-1-26.""" EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -347,10 +347,10 @@ class IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): http://www.linuxvirtualserver.org/docs/scheduling.html. """ - #: Round Robin ROUND_ROBIN = "RoundRobin" - #: Least Connection + """Round Robin""" LEAST_CONNECTION = "LeastConnection" + """Least Connection""" class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -368,10 +368,10 @@ class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ephemeral storage. """ - #: Kubelet will use the OS disk for its data. OS = "OS" - #: Kubelet will use the temporary disk for its data. + """Kubelet will use the OS disk for its data.""" TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -389,10 +389,10 @@ class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: No additional licensing is applied. NONE = "None" - #: Enables Azure Hybrid User Benefits for Windows VMs. + """No additional licensing is applied.""" WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -401,12 +401,12 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): differences between load balancer SKUs. """ - #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information - #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer - #: `_ article. STANDARD = "standard" - #: Use a basic Load Balancer with limited functionality. + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -431,95 +431,95 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more details. """ - #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use - #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. PAID = "Paid" - #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + """Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones.""" FREE = "Free" + """No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%.""" class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specify which proxy mode to use ('IPTABLES' or 'IPVS').""" - #: IPTables proxy mode IPTABLES = "IPTABLES" - #: IPVS proxy mode. Must be using Kubernetes version >= 1.22. + """IPTables proxy mode""" IPVS = "IPVS" + """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This cannot be specified if networkPlugin is anything other than 'azure'.""" - #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure - #: CNI. See `Transparent Mode `_ for - #: more information. TRANSPARENT = "transparent" - #: This is no longer supported + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" BRIDGE = "bridge" + """This is no longer supported""" class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network plugin used for building the Kubernetes network.""" - #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking - #: `_ for - #: more information. AZURE = "azure" - #: Use the Kubenet network plugin. See `Kubenet (basic) networking - #: `_ for more - #: information. + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" KUBENET = "kubenet" - #: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - #: networking functionality. + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" - #: Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - #: Kubenet reference plugins host-local and bridge. OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network policy used for building the Kubernetes network.""" - #: Use Calico network policies. See `differences between Azure and Calico policies - #: `_ - #: for more information. CALICO = "calico" - #: Use Azure network policies. See `differences between Azure and Calico policies + """Use Calico network policies. See `differences between Azure and Calico policies #: `_ - #: for more information. + #: for more information.""" AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" class NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA.""" - #: No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means - #: you are responsible for your security updates NONE = "None" - #: OS updates will be applied automatically through the OS built-in patching infrastructure. Newly + """No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means + #: you are responsible for your security updates""" + UNMANAGED = "Unmanaged" + """OS updates will be applied automatically through the OS built-in patching infrastructure. Newly #: scaled in machines will be unpatched initially, and will be patched at some later time by the #: OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner #: apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows #: does not apply security patches automatically and so for them this option is equivalent to None - #: till further notice - UNMANAGED = "Unmanaged" - #: AKS will update the nodes VHD with patches from the image maintainer labelled "security only" + #: till further notice""" + SECURITY_PATCH = "SecurityPatch" + """AKS will update the nodes VHD with patches from the image maintainer labelled "security only" #: on a regular basis. Where possible, patches will also be applied without reimaging to existing #: nodes. Some patches, such as kernel patches, cannot be applied to existing nodes without #: disruption. For such patches, the VHD will be updated, and machines will be rolling reimaged to #: that VHD following maintenance windows and surge settings. This option incurs the extra cost of - #: hosting the VHDs in your node resource group. - SECURITY_PATCH = "SecurityPatch" - #: AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a + #: hosting the VHDs in your node resource group.""" + NODE_IMAGE = "NodeImage" + """AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a #: weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following #: maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option - #: as AKS hosts the images. - NODE_IMAGE = "NodeImage" + #: as AKS hosts the images.""" class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -529,14 +529,14 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data #: loss should the VM need to be relocated to another host. Since containers aren't designed to #: have local state persisted, this behavior offers limited value while providing some drawbacks, - #: including slower node provisioning and higher read/write latency. - MANAGED = "Managed" - #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This - #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + #: including slower node provisioning and higher read/write latency.""" EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -555,10 +555,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operating system type. The default is Linux.""" - #: Use Linux. LINUX = "Linux" - #: Use Windows. + """Use Linux.""" WINDOWS = "Windows" + """Use Windows.""" class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -566,20 +566,20 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): see `egress outbound type `_. """ - #: The load balancer is used for egress through an AKS assigned public IP. This supports + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type #: loadbalancer - #: `_. - LOAD_BALANCER = "loadBalancer" - #: Egress paths must be defined by the user. This is an advanced scenario and requires proper - #: network configuration. For more information see `outbound type userDefinedRouting - #: `_. + #: `_.""" USER_DEFINED_ROUTING = "userDefinedRouting" - #: The AKS-managed NAT gateway is used for egress. + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" - #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an - #: advanced scenario and requires proper network configuration. + """The AKS-managed NAT gateway is used for egress.""" USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -595,21 +595,21 @@ class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsens class Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The network protocol of the port.""" - #: TCP protocol. TCP = "TCP" - #: UDP protocol. + """TCP protocol.""" UDP = "UDP" + """UDP protocol.""" class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Allow or deny public network access for AKS.""" - #: Inbound/Outbound to the managedCluster is allowed. ENABLED = "Enabled" - #: Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. + """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" - #: Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. + """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -617,25 +617,25 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Use an implicitly created system assigned managed identity to manage cluster resources. Master - #: components in the control plane such as kube-controller-manager will use the system assigned - #: managed identity to manipulate Azure resources. SYSTEM_ASSIGNED = "SystemAssigned" - #: Use a user-specified identity to manage cluster resources. Master components in the control - #: plane such as kube-controller-manager will use the specified user assigned managed identity to - #: manipulate Azure resources. + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" USER_ASSIGNED = "UserAssigned" - #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" class RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The restriction level applied to the cluster's node resource group.""" - #: All RBAC permissions are allowed on the managed node resource group UNRESTRICTED = "Unrestricted" - #: Only */read RBAC permissions allowed on the managed node resource group + """All RBAC permissions are allowed on the managed node resource group""" READ_ONLY = "ReadOnly" + """Only */read RBAC permissions allowed on the managed node resource group""" class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -643,11 +643,11 @@ class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Create new instances during scale up and remove instances during scale down. DELETE = "Delete" - #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances - #: during scale down. + """Create new instances during scale up and remove instances during scale down.""" DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -656,31 +656,31 @@ class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. DELETE = "Delete" - #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state - #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can - #: cause issues with cluster scaling or upgrading. + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Virtual Machine Scale Set priority.""" - #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS - #: `_ for more information. SPOT = "Spot" - #: Regular VMs will be used. + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" REGULAR = "Regular" + """Regular VMs will be used.""" class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of a snapshot. The default is NodePool.""" - #: The snapshot is a snapshot of a node pool. NODE_POOL = "NodePool" - #: The snapshot is a snapshot of a managed cluster. + """The snapshot is a snapshot of a node pool.""" MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -696,16 +696,16 @@ class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensi class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs.""" - #: First. FIRST = "First" - #: Second. + """First.""" SECOND = "Second" - #: Third. + """Second.""" THIRD = "Third" - #: Fourth. + """Third.""" FOURTH = "Fourth" - #: Last. + """Fourth.""" LAST = "Last" + """Last.""" class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -715,17 +715,17 @@ class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): creation (from Initial). The default value is Off. """ - #: Autoscaler never changes pod resources but provides recommendations. OFF = "Off" - #: Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime - #: of the pod. + """Autoscaler never changes pod resources but provides recommendations.""" INITIAL = "Initial" - #: Autoscaler assigns resources on pod creation and updates pods that need further scaling during - #: their lifetime by deleting and recreating. + """Autoscaler only assigns resources on pod creation and doesn't change them during the lifetime + #: of the pod.""" RECREATE = "Recreate" - #: Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the - #: future, it may take advantage of restart-free mechanisms once they are available. + """Autoscaler assigns resources on pod creation and updates pods that need further scaling during + #: their lifetime by deleting and recreating.""" AUTO = "Auto" + """Autoscaler chooses the update mode. Autoscaler currently does the same as Recreate. In the + #: future, it may take advantage of restart-free mechanisms once they are available.""" class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -733,29 +733,29 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_. """ - #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor #: version where N is the latest supported minor version, the cluster first upgrades to the latest #: supported patch version on N-1 minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is - #: upgraded to 1.18.6, then is upgraded to 1.19.1. - RAPID = "rapid" - #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, #: where N is the latest supported minor version. For example, if a cluster is running version #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded - #: to 1.18.6. - STABLE = "stable" - #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes #: available while keeping the minor version the same. For example, if a cluster is running #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is - #: upgraded to 1.17.9. - PATCH = "patch" - #: Automatically upgrade the node image to the latest version available. Consider using - #: nodeOSUpgradeChannel instead as that allows you to configure node OS patching separate from - #: Kubernetes version patching + #: upgraded to 1.17.9.""" NODE_IMAGE = "node-image" - #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + """Automatically upgrade the node image to the latest version available. Consider using + #: nodeOSUpgradeChannel instead as that allows you to configure node OS patching separate from + #: Kubernetes version patching""" NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -773,11 +773,11 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Determines the type of workload a node can run.""" - #: Nodes will use Kubelet to run standard OCI container workloads. OCI_CONTAINER = "OCIContainer" - #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" - #: Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due - #: to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can - #: only be used with VM series that support Nested Virtualization such as Dv3 series. + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" KATA_MSHV_VM_ISOLATION = "KataMshvVmIsolation" + """Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due + #: to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can + #: only be used with VM series that support Nested Virtualization such as Dv3 series.""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_models_py3.py index 16a72a2106b6..f436c857467f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from ... import _serialization @@ -39,7 +39,7 @@ class AbsoluteMonthlySchedule(_serialization.Model): "day_of_month": {"key": "dayOfMonth", "type": "int"}, } - def __init__(self, *, interval_months: int, day_of_month: int, **kwargs): + def __init__(self, *, interval_months: int, day_of_month: int, **kwargs: Any) -> None: """ :keyword interval_months: Specifies the number of months between each set of occurrences. Required. @@ -78,7 +78,7 @@ class SubResource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -377,8 +377,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -630,8 +630,8 @@ def __init__( self, *, agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: @@ -667,8 +667,8 @@ def __init__( default: Optional[bool] = None, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: Whether this version is the default agent pool version. :paramtype default: bool @@ -703,7 +703,7 @@ class AgentPoolListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. :paramtype value: list[~azure.mgmt.containerservice.v2022_11_02_preview.models.AgentPool] @@ -740,8 +740,8 @@ def __init__( node_public_ip_tags: Optional[List["_models.IPTag"]] = None, allowed_host_ports: Optional[List["_models.PortRange"]] = None, application_security_groups: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword node_public_ip_tags: IPTags of instance-level public IPs. :paramtype node_public_ip_tags: @@ -810,8 +810,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, latest_node_image_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -848,7 +848,9 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -875,7 +877,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): "max_surge": {"key": "maxSurge", "type": "str"}, } - def __init__(self, *, max_surge: Optional[str] = None, **kwargs): + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: """ :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the @@ -901,7 +903,7 @@ class AgentPoolWindowsProfile(_serialization.Model): "disable_outbound_nat": {"key": "disableOutboundNat", "type": "bool"}, } - def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs): + def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword disable_outbound_nat: The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP @@ -949,8 +951,8 @@ def __init__( key_id: Optional[str] = None, key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", key_vault_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Azure Key Vault key management service. The default is false. @@ -1009,8 +1011,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -1050,7 +1052,7 @@ class ContainerServiceDiagnosticsProfile(_serialization.Model): "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, } - def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs): + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: """ :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. :paramtype vm_diagnostics: @@ -1082,7 +1084,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, } - def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs): + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: """ :keyword admin_username: The administrator username to use for Linux VMs. Required. :paramtype admin_username: str @@ -1193,8 +1195,8 @@ def __init__( vnet_subnet_id: Optional[str] = None, first_consecutive_static_ip: str = "10.240.255.5", storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. Known values are: 1, 3, and 5. @@ -1387,8 +1389,8 @@ def __init__( service_cidrs: Optional[List[str]] = None, ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". @@ -1478,7 +1480,11 @@ def __init__( class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.Model): - """Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. See https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where :code:`` is represented by a :code:``-:code:`` string. Kubernetes version 1.23 would be '1-23'. + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1504,8 +1510,8 @@ def __init__( enabled: Optional[bool] = None, mode: Optional[Union[str, "_models.Mode"]] = None, ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default without these customizations). @@ -1557,8 +1563,8 @@ def __init__( tcp_timeout_seconds: Optional[int] = None, tcp_fin_timeout_seconds: Optional[int] = None, udp_timeout_seconds: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scheduler: IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and @@ -1601,7 +1607,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, } - def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs): + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. @@ -1630,7 +1636,7 @@ class ContainerServiceSshPublicKey(_serialization.Model): "key_data": {"key": "keyData", "type": "str"}, } - def __init__(self, *, key_data: str, **kwargs): + def __init__(self, *, key_data: str, **kwargs: Any) -> None: """ :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. Required. @@ -1663,7 +1669,7 @@ class ContainerServiceVMDiagnostics(_serialization.Model): "storage_uri": {"key": "storageUri", "type": "str"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. :paramtype enabled: bool @@ -1685,7 +1691,7 @@ class CreationData(_serialization.Model): "source_resource_id": {"key": "sourceResourceId", "type": "str"}, } - def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source_resource_id: This is the ARM ID of the source object to be used to create the target object. @@ -1716,7 +1722,7 @@ class CredentialResult(_serialization.Model): "value": {"key": "value", "type": "bytearray"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1741,7 +1747,7 @@ class CredentialResults(_serialization.Model): "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kubeconfigs = None @@ -1764,7 +1770,7 @@ class DailySchedule(_serialization.Model): "interval_days": {"key": "intervalDays", "type": "int"}, } - def __init__(self, *, interval_days: int, **kwargs): + def __init__(self, *, interval_days: int, **kwargs: Any) -> None: """ :keyword interval_days: Specifies the number of days between each set of occurrences. Required. :paramtype interval_days: int @@ -1794,7 +1800,7 @@ class DateSpan(_serialization.Model): "end": {"key": "end", "type": "date"}, } - def __init__(self, *, start: datetime.date, end: datetime.date, **kwargs): + def __init__(self, *, start: datetime.date, end: datetime.date, **kwargs: Any) -> None: """ :keyword start: The start date of the date span. Required. :paramtype start: ~datetime.date @@ -1826,8 +1832,8 @@ def __init__( *, domain_name: Optional[str] = None, endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The domain name of the dependency. :paramtype domain_name: str @@ -1867,8 +1873,8 @@ def __init__( port: Optional[int] = None, protocol: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_address: An IP Address that Domain Name currently resolves to. :paramtype ip_address: str @@ -1906,8 +1912,8 @@ def __init__( *, name: Optional[str] = None, type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the extended location. :paramtype name: str @@ -1959,8 +1965,8 @@ def __init__( version: str, level: Union[str, "_models.Level"], excluded_namespaces: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword version: The version of constraints to use. Required. :paramtype version: str @@ -1992,7 +1998,7 @@ class IPTag(_serialization.Model): "tag": {"key": "tag", "type": "str"}, } - def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs): + def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs: Any) -> None: """ :keyword ip_tag_type: The IP tag type. Example: RoutingPreference. :paramtype ip_tag_type: str @@ -2005,7 +2011,8 @@ def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = No class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2075,8 +2082,8 @@ def __init__( container_log_max_size_mb: Optional[int] = None, container_log_max_files: Optional[int] = None, pod_max_pids: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies `_ @@ -2128,7 +2135,8 @@ def __init__( class LinuxOSConfig(_serialization.Model): - """See `AKS custom node configuration `_ for more details. + """See `AKS custom node configuration + `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. :vartype sysctls: ~azure.mgmt.containerservice.v2022_11_02_preview.models.SysctlConfig @@ -2159,8 +2167,8 @@ def __init__( transparent_huge_page_enabled: Optional[str] = None, transparent_huge_page_defrag: Optional[str] = None, swap_file_size_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. :paramtype sysctls: ~azure.mgmt.containerservice.v2022_11_02_preview.models.SysctlConfig @@ -2184,7 +2192,8 @@ def __init__( class MaintenanceConfiguration(SubResource): - """See `planned maintenance `_ for more information about planned maintenance. + """See `planned maintenance `_ for more + information about planned maintenance. Variables are only populated by the server, and will be ignored when sending a request. @@ -2231,8 +2240,8 @@ def __init__( time_in_week: Optional[List["_models.TimeInWeek"]] = None, not_allowed_time: Optional[List["_models.TimeSpan"]] = None, maintenance_window: Optional["_models.MaintenanceWindow"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. @@ -2273,7 +2282,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of maintenance configurations. :paramtype value: @@ -2337,8 +2346,8 @@ def __init__( utc_offset: Optional[str] = None, start_date: Optional[datetime.date] = None, not_allowed_dates: Optional[List["_models.DateSpan"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword schedule: Recurrence schedule for the maintenance window. Required. :paramtype schedule: ~azure.mgmt.containerservice.v2022_11_02_preview.models.Schedule @@ -2403,7 +2412,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -2413,7 +2422,8 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -2453,7 +2463,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2560,7 +2570,7 @@ class ManagedCluster(TrackedResource): # pylint: disable=too-many-instance-attr v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. :vartype enable_pod_security_policy: bool :ivar enable_namespace_resources: The default value is false. It can be enabled/disabled on - creation and updation of the managed cluster. See `https://aka.ms/NamespaceARMResource + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource `_ for more details on Namespace as a ARM Resource. :vartype enable_namespace_resources: bool :ivar network_profile: The network configuration profile. @@ -2743,8 +2753,8 @@ def __init__( # pylint: disable=too-many-locals workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, guardrails_profile: Optional["_models.GuardrailsProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2807,7 +2817,7 @@ def __init__( # pylint: disable=too-many-locals Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. :paramtype enable_pod_security_policy: bool :keyword enable_namespace_resources: The default value is false. It can be enabled/disabled on - creation and updation of the managed cluster. See `https://aka.ms/NamespaceARMResource + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource `_ for more details on Namespace as a ARM Resource. :paramtype enable_namespace_resources: bool :keyword network_profile: The network configuration profile. @@ -2954,8 +2964,8 @@ def __init__( server_app_id: Optional[str] = None, server_app_secret: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed: Whether to enable managed AAD. :paramtype managed: bool @@ -3029,8 +3039,13 @@ class ManagedClusterAccessProfile(TrackedResource): } def __init__( - self, *, location: str, tags: Optional[Dict[str, str]] = None, kube_config: Optional[bytes] = None, **kwargs - ): + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -3070,7 +3085,7 @@ class ManagedClusterAddonProfile(_serialization.Model): "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, } - def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the add-on is enabled or not. Required. :paramtype enabled: bool @@ -3106,8 +3121,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3145,8 +3160,8 @@ def __init__( resource_id: Optional[str] = None, client_id: Optional[str] = None, object_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: The resource ID of the user assigned identity. :paramtype resource_id: str @@ -3435,8 +3450,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -3937,8 +3952,8 @@ def __init__( # pylint: disable=too-many-locals host_group_id: Optional[str] = None, windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for @@ -4203,8 +4218,8 @@ def __init__( disable_run_command: Optional[bool] = None, enable_vnet_integration: Optional[bool] = None, subnet_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are @@ -4264,8 +4279,8 @@ def __init__( *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, node_os_upgrade_channel: Optional[Union[str, "_models.NodeOSUpgradeChannel"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel `_. @@ -4295,7 +4310,9 @@ class ManagedClusterAzureMonitorProfile(_serialization.Model): "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, } - def __init__(self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs): + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: """ :keyword metrics: Metrics profile for the prometheus service addon. :paramtype metrics: @@ -4326,8 +4343,8 @@ def __init__( *, metric_labels_allowlist: Optional[str] = None, metric_annotations_allow_list: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. @@ -4368,8 +4385,8 @@ def __init__( *, enabled: bool, kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable the Prometheus collector. Required. :paramtype enabled: bool @@ -4420,8 +4437,8 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[List[str]] = None, trusted_ca: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword http_proxy: The HTTP proxy server endpoint to use. :paramtype http_proxy: str @@ -4484,8 +4501,8 @@ def __init__( user_assigned_identities: Optional[ Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: For more information see `use managed identities in AKS `_. Known values are: @@ -4517,8 +4534,8 @@ class ManagedClusterIngressProfile(_serialization.Model): } def __init__( - self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs - ): + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: @@ -4543,7 +4560,9 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs): + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable Web App Routing. :paramtype enabled: bool @@ -4576,7 +4595,7 @@ class ManagedClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. :paramtype value: list[~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedCluster] @@ -4651,8 +4670,8 @@ def __init__( idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Union[str, "_models.BackendPoolType"] = "NodeIPConfiguration", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: @@ -4717,7 +4736,7 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): "count_ipv6": {"key": "countIPv6", "type": "int"}, } - def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs): + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: """ :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default @@ -4745,7 +4764,9 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, } - def __init__(self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: @@ -4767,7 +4788,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, } - def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs): + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: @@ -4793,7 +4814,7 @@ class ManagedClusterManagedOutboundIPProfile(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: int = 1, **kwargs): + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: """ :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. @@ -4837,8 +4858,8 @@ def __init__( managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, idle_timeout_in_minutes: int = 4, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. @@ -4871,7 +4892,9 @@ class ManagedClusterNodeResourceGroupProfile(_serialization.Model): "restriction_level": {"key": "restrictionLevel", "type": "str"}, } - def __init__(self, *, restriction_level: Optional[Union[str, "_models.RestrictionLevel"]] = None, **kwargs): + def __init__( + self, *, restriction_level: Optional[Union[str, "_models.RestrictionLevel"]] = None, **kwargs: Any + ) -> None: """ :keyword restriction_level: The restriction level applied to the cluster's node resource group. Known values are: "Unrestricted" and "ReadOnly". @@ -4902,7 +4925,7 @@ class ManagedClusterOIDCIssuerProfile(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether the OIDC issuer is enabled. :paramtype enabled: bool @@ -4960,8 +4983,8 @@ def __init__( namespace: str, identity: "_models.UserAssignedIdentity", binding_selector: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the pod identity. Required. :paramtype name: str @@ -4983,7 +5006,9 @@ def __init__( class ManagedClusterPodIdentityException(_serialization.Model): - """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. All required parameters must be populated in order to send to Azure. @@ -5007,7 +5032,7 @@ class ManagedClusterPodIdentityException(_serialization.Model): "pod_labels": {"key": "podLabels", "type": "{str}"}, } - def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs): + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: """ :keyword name: The name of the pod identity exception. Required. :paramtype name: str @@ -5023,7 +5048,8 @@ def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **k class ManagedClusterPodIdentityProfile(_serialization.Model): - """See `use AAD pod identity `_ for more details on pod identity integration. + """See `use AAD pod identity `_ + for more details on pod identity integration. :ivar enabled: Whether the pod identity addon is enabled. :vartype enabled: bool @@ -5058,8 +5084,8 @@ def __init__( allow_network_plugin_kubenet: Optional[bool] = None, user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether the pod identity addon is enabled. :paramtype enabled: bool @@ -5095,7 +5121,9 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: """ :keyword error: Details about the error. :paramtype error: @@ -5136,8 +5164,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -5171,7 +5199,9 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, } - def __init__(self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs): + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: """ :keyword error: Pod identity assignment error (if any). :paramtype error: @@ -5217,8 +5247,8 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. :paramtype kubernetes_version: str @@ -5252,7 +5282,9 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): "is_preview": {"key": "isPreview", "type": "bool"}, } - def __init__(self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs): + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str @@ -5354,8 +5386,8 @@ def __init__( scale_down_utilization_threshold: Optional[str] = None, skip_nodes_with_local_storage: Optional[str] = None, skip_nodes_with_system_pods: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. :paramtype balance_similar_node_groups: str @@ -5457,8 +5489,8 @@ def __init__( kubernetes_version: Optional[str] = None, sku: Optional["_models.ManagedClusterSKU"] = None, enable_rbac: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str @@ -5527,8 +5559,8 @@ def __init__( image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, custom_ca_trust_certificates: Optional[List[bytes]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: @@ -5592,8 +5624,8 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required @@ -5621,7 +5653,7 @@ class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Mod "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Defender threat detection. :paramtype enabled: bool @@ -5631,7 +5663,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): - """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here are settings for the security profile. + """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce + attack surface area. Here are settings for the security profile. :ivar enabled: Whether to enable ImageCleaner on AKS cluster. :vartype enabled: bool @@ -5644,7 +5677,7 @@ class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): "interval_hours": {"key": "intervalHours", "type": "int"}, } - def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable ImageCleaner on AKS cluster. :paramtype enabled: bool @@ -5667,7 +5700,7 @@ class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Node Restriction. :paramtype enabled: bool @@ -5687,7 +5720,7 @@ class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Workload Identity. :paramtype enabled: bool @@ -5697,7 +5730,8 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs): class ManagedClusterServicePrincipalProfile(_serialization.Model): - """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. All required parameters must be populated in order to send to Azure. @@ -5716,7 +5750,7 @@ class ManagedClusterServicePrincipalProfile(_serialization.Model): "secret": {"key": "secret", "type": "str"}, } - def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs): + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: """ :keyword client_id: The ID for the service principal. Required. :paramtype client_id: str @@ -5751,8 +5785,8 @@ def __init__( *, name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of a managed cluster SKU. "Basic" :paramtype name: str or @@ -5834,8 +5868,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5876,7 +5910,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed cluster snapshots. :paramtype value: @@ -5918,8 +5952,8 @@ def __init__( file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: @@ -5952,7 +5986,7 @@ class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. :paramtype enabled: bool @@ -5975,7 +6009,7 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool @@ -5998,7 +6032,7 @@ class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. :paramtype enabled: bool @@ -6018,7 +6052,7 @@ class ManagedClusterStorageProfileSnapshotController(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs): + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable Snapshot Controller. The default value is true. :paramtype enabled: bool @@ -6070,8 +6104,8 @@ def __init__( *, control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. @@ -6143,8 +6177,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, enable_csi_proxy: Optional[bool] = None, gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` @@ -6209,8 +6243,8 @@ def __init__( vertical_pod_autoscaler: Optional[ "_models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. @@ -6242,7 +6276,7 @@ class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, *, enabled: bool, **kwargs): + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable KEDA. Required. :paramtype enabled: bool @@ -6288,8 +6322,8 @@ def __init__( enabled: bool = False, controlled_values: Union[str, "_models.ControlledValues"] = "RequestsAndLimits", update_mode: Union[str, "_models.UpdateMode"] = "Off", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Whether to enable VPA. Default value is false. Required. :paramtype enabled: bool @@ -6332,7 +6366,7 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -6379,8 +6413,8 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". @@ -6427,7 +6461,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[OperationValue]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -6470,7 +6504,7 @@ class OperationValue(_serialization.Model): "provider": {"key": "display.provider", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.origin = None @@ -6513,7 +6547,7 @@ class OSOptionProfile(_serialization.Model): "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, } - def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs): + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: """ :keyword os_option_property_list: The list of OS options. Required. :paramtype os_option_property_list: @@ -6547,7 +6581,7 @@ class OSOptionProperty(_serialization.Model): "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs): + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: """ :keyword os_type: The OS type. Required. :paramtype os_type: str @@ -6580,8 +6614,8 @@ def __init__( *, category: Optional[str] = None, endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword category: The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -6619,7 +6653,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs): + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: @@ -6660,8 +6694,8 @@ def __init__( port_start: Optional[int] = None, port_end: Optional[int] = None, protocol: Optional[Union[str, "_models.Protocol"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword port_start: The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. @@ -6690,7 +6724,7 @@ class PowerState(_serialization.Model): "code": {"key": "code", "type": "str"}, } - def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs): + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". @@ -6711,7 +6745,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The resource ID of the private endpoint. :paramtype id: str @@ -6768,8 +6802,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: @@ -6800,7 +6834,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6851,8 +6885,8 @@ def __init__( type: Optional[str] = None, group_id: Optional[str] = None, required_members: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the private link resource. :paramtype id: str @@ -6886,7 +6920,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The collection value. :paramtype value: @@ -6917,8 +6951,8 @@ def __init__( *, status: Optional[Union[str, "_models.ConnectionStatus"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". @@ -6933,7 +6967,8 @@ def __init__( class RelativeMonthlySchedule(_serialization.Model): - """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last + Friday'. All required parameters must be populated in order to send to Azure. @@ -6967,8 +7002,8 @@ def __init__( interval_months: int, week_index: Union[str, "_models.Type"], day_of_week: Union[str, "_models.WeekDay"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword interval_months: Specifies the number of months between each set of occurrences. Required. @@ -6999,7 +7034,7 @@ class ResourceReference(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The fully qualified Azure resource id. :paramtype id: str @@ -7031,7 +7066,9 @@ class RunCommandRequest(_serialization.Model): "cluster_token": {"key": "clusterToken", "type": "str"}, } - def __init__(self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs): + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword command: The command to run. Required. :paramtype command: str @@ -7087,7 +7124,7 @@ class RunCommandResult(_serialization.Model): "reason": {"key": "properties.reason", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -7100,7 +7137,8 @@ def __init__(self, **kwargs): class Schedule(_serialization.Model): - """One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' for your maintenance schedule. + """One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', + 'absoluteMonthly' or 'relativeMonthly' for your maintenance schedule. :ivar daily: For schedules like: 'recur every day' or 'recur every 3 days'. :vartype daily: ~azure.mgmt.containerservice.v2022_11_02_preview.models.DailySchedule @@ -7130,8 +7168,8 @@ def __init__( weekly: Optional["_models.WeeklySchedule"] = None, absolute_monthly: Optional["_models.AbsoluteMonthlySchedule"] = None, relative_monthly: Optional["_models.RelativeMonthlySchedule"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword daily: For schedules like: 'recur every day' or 'recur every 3 days'. :paramtype daily: ~azure.mgmt.containerservice.v2022_11_02_preview.models.DailySchedule @@ -7239,8 +7277,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, creation_data: Optional["_models.CreationData"] = None, snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7285,7 +7323,7 @@ class SnapshotListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. :paramtype value: list[~azure.mgmt.containerservice.v2022_11_02_preview.models.Snapshot] @@ -7418,8 +7456,8 @@ def __init__( # pylint: disable=too-many-locals vm_max_map_count: Optional[int] = None, vm_swappiness: Optional[int] = None, vm_vfs_cache_pressure: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. :paramtype net_core_somaxconn: int @@ -7548,8 +7586,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -7588,7 +7626,7 @@ class TagsObject(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7615,8 +7653,12 @@ class TimeInWeek(_serialization.Model): } def __init__( - self, *, day: Optional[Union[str, "_models.WeekDay"]] = None, hour_slots: Optional[List[int]] = None, **kwargs - ): + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -7645,7 +7687,9 @@ class TimeSpan(_serialization.Model): "end": {"key": "end", "type": "iso-8601"}, } - def __init__(self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start: The start of a time span. :paramtype start: ~datetime.datetime @@ -7685,7 +7729,7 @@ class TrustedAccessRole(_serialization.Model): "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.source_resource_type = None @@ -7743,7 +7787,7 @@ class TrustedAccessRoleBinding(Resource): "roles": {"key": "properties.roles", "type": "[str]"}, } - def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs): + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: """ :keyword source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. @@ -7779,7 +7823,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: """ :keyword value: Role binding list. :paramtype value: @@ -7811,7 +7855,7 @@ class TrustedAccessRoleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -7851,7 +7895,7 @@ class TrustedAccessRoleRule(_serialization.Model): "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.verbs = None @@ -7883,7 +7927,7 @@ class WeeklySchedule(_serialization.Model): "day_of_week": {"key": "dayOfWeek", "type": "str"}, } - def __init__(self, *, interval_weeks: int, day_of_week: Union[str, "_models.WeekDay"], **kwargs): + def __init__(self, *, interval_weeks: int, day_of_week: Union[str, "_models.WeekDay"], **kwargs: Any) -> None: """ :keyword interval_weeks: Specifies the number of weeks between each set of occurrences. Required. @@ -7925,8 +7969,8 @@ def __init__( enabled: Optional[bool] = None, dns_server: Optional[str] = None, root_domain_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. :paramtype enabled: bool diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_agent_pools_operations.py index ca88d60c9c9e..0b1ff5b12109 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_agent_pools_operations.py @@ -897,7 +897,7 @@ def begin_create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a model type or a IO type. + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.AgentPool or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1310,7 +1310,7 @@ def _upgrade_node_image_version_initial( @distributed_trace def begin_upgrade_node_image_version( self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.AgentPool]: """Upgrades the node image version of an agent pool to the latest. Upgrading the node image version of an agent pool applies the newest OS and runtime updates to diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_maintenance_configurations_operations.py index becba72e83ba..5c613bfee310 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_maintenance_configurations_operations.py @@ -487,8 +487,8 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. Required. :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a model type or - a IO type. Required. + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.MaintenanceConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_cluster_snapshots_operations.py index e03328f064ca..0bf9810a6873 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -615,8 +615,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a model type or - a IO type. Required. + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedClusterSnapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -768,7 +768,7 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a model type or a IO type. Required. + Is either a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_clusters_operations.py index 69f6be28693e..37f9fb6bf112 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_managed_clusters_operations.py @@ -1828,8 +1828,8 @@ def begin_create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a model type or a IO - type. Required. + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedCluster or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2054,7 +2054,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a model type or a IO type. Required. + a TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2419,7 +2419,7 @@ def begin_reset_service_principal_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Is either a - model type or a IO type. Required. + ManagedClusterServicePrincipalProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedClusterServicePrincipalProfile or IO @@ -2648,8 +2648,8 @@ def begin_reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a model type or a - IO type. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.ManagedClusterAADProfile or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3520,7 +3520,8 @@ def begin_run_command( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Is either a model type or a IO type. Required. + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. :type request_payload: ~azure.mgmt.containerservice.v2022_11_02_preview.models.RunCommandRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_private_endpoint_connections_operations.py index d8b2310ae03c..6981c863ee80 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_private_endpoint_connections_operations.py @@ -479,8 +479,8 @@ def update( :type resource_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a model type or a IO - type. Required. + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_resolve_private_link_service_id_operations.py index cca5d8daa904..390c8f8fe0de 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -181,7 +181,7 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either - a model type or a IO type. Required. + a PrivateLinkResource type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.PrivateLinkResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_snapshots_operations.py index 7e2653065fcd..f99ea114f460 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_snapshots_operations.py @@ -602,7 +602,7 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Is either a model type or a IO type. + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.Snapshot or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -751,8 +751,8 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a model - type or a IO type. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. :type parameters: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TagsObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_trusted_access_role_bindings_operations.py index fab74f366bf6..b87bf5ebdda2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_11_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -520,8 +520,8 @@ def create_or_update( :type resource_name: str :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a model type or a - IO type. Required. + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. :type trusted_access_role_binding: ~azure.mgmt.containerservice.v2022_11_02_preview.models.TrustedAccessRoleBinding or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/__init__.py new file mode 100644 index 000000000000..4f004a298ed4 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/__init__.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ContainerServiceClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_configuration.py new file mode 100644 index 000000000000..4658e0bbb088 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_configuration.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_container_service_client.py new file mode 100644 index 000000000000..195dd5d93ffe --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_container_service_client.py @@ -0,0 +1,136 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, TYPE_CHECKING + +from azure.core.rest import HttpRequest, HttpResponse +from azure.mgmt.core import ARMPipelineClient + +from . import models as _models +from .._serialization import Deserializer, Serializer +from ._configuration import ContainerServiceClientConfiguration +from .operations import ( + AgentPoolsOperations, + MaintenanceConfigurationsOperations, + ManagedClustersOperations, + Operations, + PrivateEndpointConnectionsOperations, + PrivateLinkResourcesOperations, + ResolvePrivateLinkServiceIdOperations, + SnapshotsOperations, +) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2023_01_01.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: + azure.mgmt.containerservice.v2023_01_01.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: + azure.mgmt.containerservice.v2023_01_01.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2023_01_01.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.containerservice.v2023_01_01.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.containerservice.v2023_01_01.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: + azure.mgmt.containerservice.v2023_01_01.operations.ResolvePrivateLinkServiceIdOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: azure.mgmt.containerservice.v2023_01_01.operations.SnapshotsOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = ContainerServiceClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> "ContainerServiceClient": + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_metadata.json new file mode 100644 index 000000000000..589c6fcd5b7f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_metadata.json @@ -0,0 +1,117 @@ +{ + "chosen_version": "2023-01-01", + "total_api_version_list": ["2023-01-01"], + "client": { + "name": "ContainerServiceClient", + "filename": "_container_service_client", + "description": "The Container Service Client.", + "host_value": "\"https://management.azure.com\"", + "parameterized_host_template": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"azurecore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"azurecore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential: \"TokenCredential\",", + "description": "Credential needed for the client to connect to Azure. Required.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true, + "method_location": "positional" + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription. Required.", + "docstring_type": "str", + "required": true, + "method_location": "positional" + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure. Required.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription. Required.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version: Optional[str]=None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "profile": { + "signature": "profile: KnownProfiles=KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false, + "method_location": "positional" + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false, + "method_location": "positional" + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "managed_clusters": "ManagedClustersOperations", + "maintenance_configurations": "MaintenanceConfigurationsOperations", + "agent_pools": "AgentPoolsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", + "resolve_private_link_service_id": "ResolvePrivateLinkServiceIdOperations", + "snapshots": "SnapshotsOperations" + } +} diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_vendor.py new file mode 100644 index 000000000000..bd0df84f5319 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_vendor.py @@ -0,0 +1,30 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import List, cast + +from azure.core.pipeline.transport import HttpRequest + + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] + template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/__init__.py new file mode 100644 index 000000000000..d14e96ddb36e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ContainerServiceClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_configuration.py new file mode 100644 index 000000000000..9a41c9ada32c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_configuration.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_container_service_client.py new file mode 100644 index 000000000000..7284bcb0b606 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_container_service_client.py @@ -0,0 +1,137 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models as _models +from ..._serialization import Deserializer, Serializer +from ._configuration import ContainerServiceClientConfiguration +from .operations import ( + AgentPoolsOperations, + MaintenanceConfigurationsOperations, + ManagedClustersOperations, + Operations, + PrivateEndpointConnectionsOperations, + PrivateLinkResourcesOperations, + ResolvePrivateLinkServiceIdOperations, + SnapshotsOperations, +) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2023_01_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: + azure.mgmt.containerservice.v2023_01_01.aio.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: + azure.mgmt.containerservice.v2023_01_01.aio.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: + azure.mgmt.containerservice.v2023_01_01.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.containerservice.v2023_01_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.containerservice.v2023_01_01.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: + azure.mgmt.containerservice.v2023_01_01.aio.operations.ResolvePrivateLinkServiceIdOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: azure.mgmt.containerservice.v2023_01_01.aio.operations.SnapshotsOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = ContainerServiceClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/__init__.py new file mode 100644 index 000000000000..6b6648716199 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/__init__.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations +from ._snapshots_operations import SnapshotsOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "ManagedClustersOperations", + "MaintenanceConfigurationsOperations", + "AgentPoolsOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", + "ResolvePrivateLinkServiceIdOperations", + "SnapshotsOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_agent_pools_operations.py new file mode 100644 index 000000000000..9c0ab69f98f3 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,1003 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._agent_pools_operations import ( + build_abort_latest_operation_request, + build_create_or_update_request, + build_delete_request, + build_get_available_agent_pool_versions_request, + build_get_request, + build_get_upgrade_profile_request, + build_list_request, + build_upgrade_node_image_version_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class AgentPoolsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`agent_pools` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace_async + async def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Aborts last operation running on agent pool. + + Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a + Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + completes before cancellation can take place, a 409 error code is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace + def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> AsyncIterable["_models.AgentPool"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPool or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPoolListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AgentPoolListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPool: + """Gets the specified managed cluster agent pool. + + Gets the specified managed cluster agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> _models.AgentPool: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "AgentPool") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _models.AgentPool, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPool or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool in the specified managed cluster. + + Deletes an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace_async + async def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPoolUpgradeProfile: + """Gets the upgrade profile for an agent pool. + + Gets the upgrade profile for an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default" + } + + @distributed_trace_async + async def get_available_agent_pool_versions( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.AgentPoolAvailableVersions: + """Gets a list of supported Kubernetes versions for the specified agent pool. + + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolAvailableVersions + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) + + request = build_get_available_agent_pool_versions_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_available_agent_pool_versions.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolAvailableVersions", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_available_agent_pool_versions.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions" + } + + async def _upgrade_node_image_version_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Optional[_models.AgentPool]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[Optional[_models.AgentPool]] = kwargs.pop("cls", None) + + request = build_upgrade_node_image_version_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._upgrade_node_image_version_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _upgrade_node_image_version_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } + + @distributed_trace_async + async def begin_upgrade_node_image_version( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Upgrades the node image version of an agent pool to the latest. + + Upgrading the node image version of an agent pool applies the newest OS and runtime updates to + the nodes. AKS provides one new image per week with the latest updates. For more details on + node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_upgrade_node_image_version.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_maintenance_configurations_operations.py new file mode 100644 index 000000000000..38408e22207a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_maintenance_configurations_operations.py @@ -0,0 +1,448 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._maintenance_configurations_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_managed_cluster_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class MaintenanceConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncIterable["_models.MaintenanceConfiguration"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfiguration or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.MaintenanceConfigurationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_managed_cluster.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("MaintenanceConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_managed_cluster.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Gets the specified maintenance configuration of a managed cluster. + + Gets the specified maintenance configuration of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: _models.MaintenanceConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, IO], + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "MaintenanceConfiguration") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes a maintenance configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_managed_clusters_operations.py new file mode 100644 index 000000000000..900cc7f4a29d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,2772 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._managed_clusters_operations import ( + build_abort_latest_operation_request, + build_create_or_update_request, + build_delete_request, + build_get_access_profile_request, + build_get_command_result_request, + build_get_os_options_request, + build_get_request, + build_get_upgrade_profile_request, + build_list_by_resource_group_request, + build_list_cluster_admin_credentials_request, + build_list_cluster_monitoring_user_credentials_request, + build_list_cluster_user_credentials_request, + build_list_outbound_network_dependencies_endpoints_request, + build_list_request, + build_reset_aad_profile_request, + build_reset_service_principal_profile_request, + build_rotate_cluster_certificates_request, + build_rotate_service_account_signing_keys_request, + build_run_command_request, + build_start_request, + build_stop_request, + build_update_tags_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ManagedClustersOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`managed_clusters` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_os_options( + self, location: str, resource_type: Optional[str] = None, **kwargs: Any + ) -> _models.OSOptionProfile: + """Gets supported OS options in the specified subscription. + + Gets supported OS options in the specified subscription. + + :param location: The name of Azure region. Required. + :type location: str + :param resource_type: The resource type for which the OS options needs to be returned. Default + value is None. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.OSOptionProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.OSOptionProfile] = kwargs.pop("cls", None) + + request = build_get_os_options_request( + location=location, + subscription_id=self._config.subscription_id, + resource_type=resource_type, + api_version=api_version, + template_url=self.get_os_options.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("OSOptionProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_os_options.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + } + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedCluster"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters"} + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.ManagedCluster"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters" + } + + @distributed_trace_async + async def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.ManagedClusterUpgradeProfile: + """Gets the upgrade profile of a managed cluster. + + Gets the upgrade profile of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default" + } + + @distributed_trace_async + async def get_access_profile( + self, resource_group_name: str, resource_name: str, role_name: str, **kwargs: Any + ) -> _models.ManagedClusterAccessProfile: + """Gets an access profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Instead use `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. Required. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAccessProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) + + request = build_get_access_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + role_name=role_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_access_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterAccessProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_access_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential" + } + + @distributed_trace_async + async def list_cluster_admin_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the admin credentials of a managed cluster. + + Lists the admin credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_admin_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_admin_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_admin_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential" + } + + @distributed_trace_async + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + format: Optional[Union[str, _models.Format]] = None, + **kwargs: Any + ) -> _models.CredentialResults: + """Lists the user credentials of a managed cluster. + + Lists the user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :param format: Only apply to AAD clusters, specifies the format of returned kubeconfig. Format + 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format + kubeconfig, which requires kubelogin binary in the path. Known values are: "azure" and "exec". + Default value is None. + :type format: str or ~azure.mgmt.containerservice.v2023_01_01.models.Format + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + format=format, + api_version=api_version, + template_url=self.list_cluster_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential" + } + + @distributed_trace_async + async def list_cluster_monitoring_user_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the cluster monitoring user credentials of a managed cluster. + + Lists the cluster monitoring user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_monitoring_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_monitoring_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_monitoring_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential" + } + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: + """Gets a managed cluster. + + Gets a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _create_or_update_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedCluster") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedCluster, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _update_tags_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_tags_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either + a TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @distributed_trace_async + async def begin_delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _reset_service_principal_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterServicePrincipalProfile") + + request = build_reset_service_principal_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_service_principal_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_service_principal_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + @overload + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterServicePrincipalProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterServicePrincipalProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Is either a + ManagedClusterServicePrincipalProfile type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterServicePrincipalProfile or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_service_principal_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + async def _reset_aad_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterAADProfile") + + request = build_reset_aad_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_aad_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_aad_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + @overload + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterAADProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAADProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAADProfile or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_aad_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + async def _rotate_cluster_certificates_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_cluster_certificates_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_cluster_certificates_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_cluster_certificates_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + @distributed_trace_async + async def begin_rotate_cluster_certificates( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotates the certificates of a managed cluster. + + See `Certificate rotation `_ for + more details about rotating managed cluster certificates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._rotate_cluster_certificates_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_cluster_certificates.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + async def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + @distributed_trace_async + async def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Aborts last operation running on managed cluster. + + Aborts the currently running operation on the managed cluster. The Managed Cluster will be + moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If + the operation completes before cancellation can take place, a 409 error code is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + async def _rotate_service_account_signing_keys_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_service_account_signing_keys_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_service_account_signing_keys_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_service_account_signing_keys_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + @distributed_trace_async + async def begin_rotate_service_account_signing_keys( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotates the service account signing keys of a managed cluster. + + Rotates the service account signing keys of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._rotate_service_account_signing_keys_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_service_account_signing_keys.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + async def _stop_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_stop_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _stop_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + @distributed_trace_async + async def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Stops a Managed Cluster. + + This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a + cluster stops the control plane and agent nodes entirely, while maintaining all object and + cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster + `_ for more details about stopping a + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._stop_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_stop.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + async def _start_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_start_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _start_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + @distributed_trace_async + async def begin_start(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Starts a previously stopped Managed Cluster. + + See `starting a cluster `_ for more + details about starting a cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._start_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_start.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + async def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(request_payload, (IO, bytes)): + _content = request_payload + else: + _json = self._serialize.body(request_payload, "RunCommandRequest") + + request = build_run_command_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._run_command_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _run_command_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @overload + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: _models.RunCommandRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: ~azure.mgmt.containerservice.v2023_01_01.models.RunCommandRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. + :type request_payload: ~azure.mgmt.containerservice.v2023_01_01.models.RunCommandRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("RunCommandResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_run_command.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @distributed_trace_async + async def get_command_result( + self, resource_group_name: str, resource_name: str, command_id: str, **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + """Gets the results of a command which has been run on the Managed Cluster. + + Gets the results of a command which has been run on the Managed Cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param command_id: Id of the command. Required. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult or None or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + request = build_get_command_result_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + command_id=command_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_command_result.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + get_command_result.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}" + } + + @distributed_trace + def list_outbound_network_dependencies_endpoints( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncIterable["_models.OutboundEnvironmentEndpoint"]: + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. + + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpoint or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.OutboundEnvironmentEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.OutboundEnvironmentEndpointCollection] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_outbound_network_dependencies_endpoints.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OutboundEnvironmentEndpointCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_outbound_network_dependencies_endpoints.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_operations.py new file mode 100644 index 000000000000..ab3231685e15 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_operations.py @@ -0,0 +1,139 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import build_list_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationValue"]: + """Gets a list of operations. + + Gets a list of operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationValue or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.OperationValue] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.ContainerService/operations"} diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..00c3dae5ffea --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,474 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_endpoint_connections_operations import ( + build_delete_request, + build_get_request, + build_list_request, + build_update_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnectionListResult: + """Gets a list of private endpoint connections in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnectionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the specified private endpoint connection. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, IO], + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateEndpointConnection") + + request = build_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..aae30f09b0f2 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,122 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_link_resources_operations import build_list_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`private_link_resources` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResourcesListResult: + """Gets a list of private link resources in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResourcesListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.PrivateLinkResourcesListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResourcesListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 000000000000..20838e2ade6d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,203 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._resolve_private_link_service_id_operations import build_post_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ResolvePrivateLinkServiceIdOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`resolve_private_link_service_id` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.PrivateLinkResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.PrivateLinkResource, IO], + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Is either + a PrivateLinkResource type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateLinkResource") + + request = build_post_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + post.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_snapshots_operations.py new file mode 100644 index 000000000000..743b1ea92e0c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/aio/operations/_snapshots_operations.py @@ -0,0 +1,650 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._snapshots_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_resource_group_request, + build_list_request, + build_update_tags_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class SnapshotsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.aio.ContainerServiceClient`'s + :attr:`snapshots` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. + + Gets a list of snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots"} + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: + """Lists snapshots in the specified subscription and resource group. + + Lists snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots" + } + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: + """Gets a snapshot. + + Gets a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.Snapshot, IO], **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Snapshot") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update_tags.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """Deletes a snapshot. + + Deletes a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/__init__.py new file mode 100644 index 000000000000..780dda16e6b5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/__init__.py @@ -0,0 +1,291 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._models_py3 import AgentPool +from ._models_py3 import AgentPoolAvailableVersions +from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem +from ._models_py3 import AgentPoolListResult +from ._models_py3 import AgentPoolUpgradeProfile +from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem +from ._models_py3 import AgentPoolUpgradeSettings +from ._models_py3 import AzureKeyVaultKms +from ._models_py3 import CloudErrorBody +from ._models_py3 import ContainerServiceDiagnosticsProfile +from ._models_py3 import ContainerServiceLinuxProfile +from ._models_py3 import ContainerServiceMasterProfile +from ._models_py3 import ContainerServiceNetworkProfile +from ._models_py3 import ContainerServiceSshConfiguration +from ._models_py3 import ContainerServiceSshPublicKey +from ._models_py3 import ContainerServiceVMDiagnostics +from ._models_py3 import CreationData +from ._models_py3 import CredentialResult +from ._models_py3 import CredentialResults +from ._models_py3 import EndpointDependency +from ._models_py3 import EndpointDetail +from ._models_py3 import ExtendedLocation +from ._models_py3 import KubeletConfig +from ._models_py3 import LinuxOSConfig +from ._models_py3 import MaintenanceConfiguration +from ._models_py3 import MaintenanceConfigurationListResult +from ._models_py3 import ManagedCluster +from ._models_py3 import ManagedClusterAADProfile +from ._models_py3 import ManagedClusterAPIServerAccessProfile +from ._models_py3 import ManagedClusterAccessProfile +from ._models_py3 import ManagedClusterAddonProfile +from ._models_py3 import ManagedClusterAddonProfileIdentity +from ._models_py3 import ManagedClusterAgentPoolProfile +from ._models_py3 import ManagedClusterAgentPoolProfileProperties +from ._models_py3 import ManagedClusterAutoUpgradeProfile +from ._models_py3 import ManagedClusterAzureMonitorProfile +from ._models_py3 import ManagedClusterAzureMonitorProfileKubeStateMetrics +from ._models_py3 import ManagedClusterAzureMonitorProfileMetrics +from ._models_py3 import ManagedClusterHTTPProxyConfig +from ._models_py3 import ManagedClusterIdentity +from ._models_py3 import ManagedClusterListResult +from ._models_py3 import ManagedClusterLoadBalancerProfile +from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs +from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes +from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs +from ._models_py3 import ManagedClusterManagedOutboundIPProfile +from ._models_py3 import ManagedClusterNATGatewayProfile +from ._models_py3 import ManagedClusterOIDCIssuerProfile +from ._models_py3 import ManagedClusterPodIdentity +from ._models_py3 import ManagedClusterPodIdentityException +from ._models_py3 import ManagedClusterPodIdentityProfile +from ._models_py3 import ManagedClusterPodIdentityProvisioningError +from ._models_py3 import ManagedClusterPodIdentityProvisioningErrorBody +from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo +from ._models_py3 import ManagedClusterPoolUpgradeProfile +from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem +from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile +from ._models_py3 import ManagedClusterSKU +from ._models_py3 import ManagedClusterSecurityProfile +from ._models_py3 import ManagedClusterSecurityProfileDefender +from ._models_py3 import ManagedClusterSecurityProfileDefenderSecurityMonitoring +from ._models_py3 import ManagedClusterServicePrincipalProfile +from ._models_py3 import ManagedClusterStorageProfile +from ._models_py3 import ManagedClusterStorageProfileBlobCSIDriver +from ._models_py3 import ManagedClusterStorageProfileDiskCSIDriver +from ._models_py3 import ManagedClusterStorageProfileFileCSIDriver +from ._models_py3 import ManagedClusterStorageProfileSnapshotController +from ._models_py3 import ManagedClusterUpgradeProfile +from ._models_py3 import ManagedClusterWindowsProfile +from ._models_py3 import ManagedClusterWorkloadAutoScalerProfile +from ._models_py3 import ManagedClusterWorkloadAutoScalerProfileKeda +from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue +from ._models_py3 import OSOptionProfile +from ._models_py3 import OSOptionProperty +from ._models_py3 import OperationListResult +from ._models_py3 import OperationValue +from ._models_py3 import OutboundEnvironmentEndpoint +from ._models_py3 import OutboundEnvironmentEndpointCollection +from ._models_py3 import PowerState +from ._models_py3 import PrivateEndpoint +from ._models_py3 import PrivateEndpointConnection +from ._models_py3 import PrivateEndpointConnectionListResult +from ._models_py3 import PrivateLinkResource +from ._models_py3 import PrivateLinkResourcesListResult +from ._models_py3 import PrivateLinkServiceConnectionState +from ._models_py3 import Resource +from ._models_py3 import ResourceReference +from ._models_py3 import RunCommandRequest +from ._models_py3 import RunCommandResult +from ._models_py3 import Snapshot +from ._models_py3 import SnapshotListResult +from ._models_py3 import SubResource +from ._models_py3 import SysctlConfig +from ._models_py3 import SystemData +from ._models_py3 import TagsObject +from ._models_py3 import TimeInWeek +from ._models_py3 import TimeSpan +from ._models_py3 import TrackedResource +from ._models_py3 import UserAssignedIdentity +from ._models_py3 import WindowsGmsaProfile + +from ._container_service_client_enums import AgentPoolMode +from ._container_service_client_enums import AgentPoolType +from ._container_service_client_enums import Code +from ._container_service_client_enums import ConnectionStatus +from ._container_service_client_enums import ContainerServiceStorageProfileTypes +from ._container_service_client_enums import ContainerServiceVMSizeTypes +from ._container_service_client_enums import Count +from ._container_service_client_enums import CreatedByType +from ._container_service_client_enums import Expander +from ._container_service_client_enums import ExtendedLocationTypes +from ._container_service_client_enums import Format +from ._container_service_client_enums import GPUInstanceProfile +from ._container_service_client_enums import IpFamily +from ._container_service_client_enums import KeyVaultNetworkAccessTypes +from ._container_service_client_enums import KubeletDiskType +from ._container_service_client_enums import LicenseType +from ._container_service_client_enums import LoadBalancerSku +from ._container_service_client_enums import ManagedClusterPodIdentityProvisioningState +from ._container_service_client_enums import ManagedClusterSKUName +from ._container_service_client_enums import ManagedClusterSKUTier +from ._container_service_client_enums import NetworkMode +from ._container_service_client_enums import NetworkPlugin +from ._container_service_client_enums import NetworkPolicy +from ._container_service_client_enums import OSDiskType +from ._container_service_client_enums import OSSKU +from ._container_service_client_enums import OSType +from ._container_service_client_enums import OutboundType +from ._container_service_client_enums import PrivateEndpointConnectionProvisioningState +from ._container_service_client_enums import PublicNetworkAccess +from ._container_service_client_enums import ResourceIdentityType +from ._container_service_client_enums import ScaleDownMode +from ._container_service_client_enums import ScaleSetEvictionPolicy +from ._container_service_client_enums import ScaleSetPriority +from ._container_service_client_enums import SnapshotType +from ._container_service_client_enums import UpgradeChannel +from ._container_service_client_enums import WeekDay +from ._container_service_client_enums import WorkloadRuntime +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "AgentPool", + "AgentPoolAvailableVersions", + "AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", + "AgentPoolListResult", + "AgentPoolUpgradeProfile", + "AgentPoolUpgradeProfilePropertiesUpgradesItem", + "AgentPoolUpgradeSettings", + "AzureKeyVaultKms", + "CloudErrorBody", + "ContainerServiceDiagnosticsProfile", + "ContainerServiceLinuxProfile", + "ContainerServiceMasterProfile", + "ContainerServiceNetworkProfile", + "ContainerServiceSshConfiguration", + "ContainerServiceSshPublicKey", + "ContainerServiceVMDiagnostics", + "CreationData", + "CredentialResult", + "CredentialResults", + "EndpointDependency", + "EndpointDetail", + "ExtendedLocation", + "KubeletConfig", + "LinuxOSConfig", + "MaintenanceConfiguration", + "MaintenanceConfigurationListResult", + "ManagedCluster", + "ManagedClusterAADProfile", + "ManagedClusterAPIServerAccessProfile", + "ManagedClusterAccessProfile", + "ManagedClusterAddonProfile", + "ManagedClusterAddonProfileIdentity", + "ManagedClusterAgentPoolProfile", + "ManagedClusterAgentPoolProfileProperties", + "ManagedClusterAutoUpgradeProfile", + "ManagedClusterAzureMonitorProfile", + "ManagedClusterAzureMonitorProfileKubeStateMetrics", + "ManagedClusterAzureMonitorProfileMetrics", + "ManagedClusterHTTPProxyConfig", + "ManagedClusterIdentity", + "ManagedClusterListResult", + "ManagedClusterLoadBalancerProfile", + "ManagedClusterLoadBalancerProfileManagedOutboundIPs", + "ManagedClusterLoadBalancerProfileOutboundIPPrefixes", + "ManagedClusterLoadBalancerProfileOutboundIPs", + "ManagedClusterManagedOutboundIPProfile", + "ManagedClusterNATGatewayProfile", + "ManagedClusterOIDCIssuerProfile", + "ManagedClusterPodIdentity", + "ManagedClusterPodIdentityException", + "ManagedClusterPodIdentityProfile", + "ManagedClusterPodIdentityProvisioningError", + "ManagedClusterPodIdentityProvisioningErrorBody", + "ManagedClusterPodIdentityProvisioningInfo", + "ManagedClusterPoolUpgradeProfile", + "ManagedClusterPoolUpgradeProfileUpgradesItem", + "ManagedClusterPropertiesAutoScalerProfile", + "ManagedClusterSKU", + "ManagedClusterSecurityProfile", + "ManagedClusterSecurityProfileDefender", + "ManagedClusterSecurityProfileDefenderSecurityMonitoring", + "ManagedClusterServicePrincipalProfile", + "ManagedClusterStorageProfile", + "ManagedClusterStorageProfileBlobCSIDriver", + "ManagedClusterStorageProfileDiskCSIDriver", + "ManagedClusterStorageProfileFileCSIDriver", + "ManagedClusterStorageProfileSnapshotController", + "ManagedClusterUpgradeProfile", + "ManagedClusterWindowsProfile", + "ManagedClusterWorkloadAutoScalerProfile", + "ManagedClusterWorkloadAutoScalerProfileKeda", + "ManagedServiceIdentityUserAssignedIdentitiesValue", + "OSOptionProfile", + "OSOptionProperty", + "OperationListResult", + "OperationValue", + "OutboundEnvironmentEndpoint", + "OutboundEnvironmentEndpointCollection", + "PowerState", + "PrivateEndpoint", + "PrivateEndpointConnection", + "PrivateEndpointConnectionListResult", + "PrivateLinkResource", + "PrivateLinkResourcesListResult", + "PrivateLinkServiceConnectionState", + "Resource", + "ResourceReference", + "RunCommandRequest", + "RunCommandResult", + "Snapshot", + "SnapshotListResult", + "SubResource", + "SysctlConfig", + "SystemData", + "TagsObject", + "TimeInWeek", + "TimeSpan", + "TrackedResource", + "UserAssignedIdentity", + "WindowsGmsaProfile", + "AgentPoolMode", + "AgentPoolType", + "Code", + "ConnectionStatus", + "ContainerServiceStorageProfileTypes", + "ContainerServiceVMSizeTypes", + "Count", + "CreatedByType", + "Expander", + "ExtendedLocationTypes", + "Format", + "GPUInstanceProfile", + "IpFamily", + "KeyVaultNetworkAccessTypes", + "KubeletDiskType", + "LicenseType", + "LoadBalancerSku", + "ManagedClusterPodIdentityProvisioningState", + "ManagedClusterSKUName", + "ManagedClusterSKUTier", + "NetworkMode", + "NetworkPlugin", + "NetworkPolicy", + "OSDiskType", + "OSSKU", + "OSType", + "OutboundType", + "PrivateEndpointConnectionProvisioningState", + "PublicNetworkAccess", + "ResourceIdentityType", + "ScaleDownMode", + "ScaleSetEvictionPolicy", + "ScaleSetPriority", + "SnapshotType", + "UpgradeChannel", + "WeekDay", + "WorkloadRuntime", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_container_service_client_enums.py new file mode 100644 index 000000000000..04847f3a8d7b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_container_service_client_enums.py @@ -0,0 +1,629 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """A cluster must have at least one 'System' Agent Pool at all times. For additional information + on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. + """ + + SYSTEM = "System" + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" + USER = "User" + """User agent pools are primarily for hosting your application pods.""" + + +class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of Agent Pool.""" + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" + AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" + + +class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Tells whether the cluster is Running or Stopped.""" + + RUNNING = "Running" + """The cluster is running.""" + STOPPED = "Stopped" + """The cluster is stopped.""" + + +class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The private link service connection status.""" + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + + +class ContainerServiceStorageProfileTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies what kind of storage to use. If omitted, the default will be chosen on your behalf + based on the choice of orchestrator. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + + +class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Size of agent VMs. Note: This is no longer maintained.""" + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + + +class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource.""" + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + + +class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """If not specified, the default is 'random'. See `expanders + `_ + for more information. + """ + + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after + #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or + #: high memory nodes, and only want to expand those when there are pending pods that need a lot of + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is + #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note + #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple + #: smaller nodes at once.""" + PRIORITY = "priority" + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" + RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" + + +class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of extendedLocation.""" + + EDGE_ZONE = "EdgeZone" + + +class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Format.""" + + AZURE = "azure" + """Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully + #: removed in v1.26. See: https://aka.ms/k8s/changes-1-26.""" + EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" + + +class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.""" + + MIG1_G = "MIG1g" + MIG2_G = "MIG2g" + MIG3_G = "MIG3g" + MIG4_G = "MIG4g" + MIG7_G = "MIG7g" + + +class IpFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The IP version to use for cluster networking and IP assignment.""" + + I_PV4 = "IPv4" + I_PV6 = "IPv6" + + +class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network access of key vault. The possible values are ``Public`` and ``Private``. ``Public`` + means the key vault allows public access from all networks. ``Private`` means the key vault + disables public access and enables private link. The default value is ``Public``. + """ + + PUBLIC = "Public" + PRIVATE = "Private" + + +class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Determines the placement of emptyDir volumes, container runtime data root, and Kubelet + ephemeral storage. + """ + + OS = "OS" + """Kubelet will use the OS disk for its data.""" + TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" + + +class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. + """ + + NONE = "None" + """No additional licensing is applied.""" + WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" + + +class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. + """ + + STANDARD = "standard" + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" + BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" + + +class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state of the pod identity.""" + + ASSIGNED = "Assigned" + CANCELED = "Canceled" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + +class ManagedClusterSKUName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The name of a managed cluster SKU.""" + + BASIC = "Basic" + """Basic will be removed in 07/01/2023 API version. Base will replace Basic, please switch to + #: Base.""" + BASE = "Base" + """Base option for the AKS control plane.""" + + +class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """If not specified, the default is 'Free'. See `AKS Pricing Tier + `_ for more details. + """ + + PAID = "Paid" + """Paid tier will be removed in 07/01/2023 API version. Standard tier will replace Paid tier, + #: please switch to Standard tier.""" + STANDARD = "Standard" + """Recommended for mission-critical and production workloads. Includes Kubernetes control plane + #: autoscaling, workload-intensive testing, and up to 5,000 nodes per cluster. Guarantees 99.95% + #: availability of the Kubernetes API server endpoint for clusters that use Availability Zones and + #: 99.9% of availability for clusters that don't use Availability Zones.""" + FREE = "Free" + """The cluster management is free, but charged for VM, storage, and networking usage. Best for + #: experimenting, learning, simple testing, or workloads with fewer than 10 nodes. Not recommended + #: for production use cases.""" + + +class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This cannot be specified if networkPlugin is anything other than 'azure'.""" + + TRANSPARENT = "transparent" + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" + BRIDGE = "bridge" + """This is no longer supported""" + + +class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network plugin used for building the Kubernetes network.""" + + AZURE = "azure" + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" + KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" + NONE = "none" + """No CNI plugin is pre-installed. See `BYO CNI + #: `_ for more information.""" + + +class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network policy used for building the Kubernetes network.""" + + CALICO = "calico" + """Use Calico network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" + AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" + + +class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested + OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more + information see `Ephemeral OS + `_. + """ + + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + #: loss should the VM need to be relocated to another host. Since containers aren't designed to + #: have local state persisted, this behavior offers limited value while providing some drawbacks, + #: including slower node provisioning and higher read/write latency.""" + EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" + + +class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The + default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType + is Windows. + """ + + UBUNTU = "Ubuntu" + CBL_MARINER = "CBLMariner" + WINDOWS2019 = "Windows2019" + WINDOWS2022 = "Windows2022" + + +class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The operating system type. The default is Linux.""" + + LINUX = "Linux" + """Use Linux.""" + WINDOWS = "Windows" + """Use Windows.""" + + +class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This can only be set at cluster creation time and cannot be changed later. For more information + see `egress outbound type `_. + """ + + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports + #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type + #: loadbalancer + #: `_.""" + USER_DEFINED_ROUTING = "userDefinedRouting" + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" + MANAGED_NAT_GATEWAY = "managedNATGateway" + """The AKS-managed NAT gateway is used for egress.""" + USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" + + +class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state.""" + + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + +class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Allow or deny public network access for AKS.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" + + +class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """For more information see `use managed identities in AKS + `_. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" + USER_ASSIGNED = "UserAssigned" + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" + NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" + + +class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes how VMs are added to or removed from Agent Pools. See `billing states + `_. + """ + + DELETE = "Delete" + """Create new instances during scale up and remove instances during scale down.""" + DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" + + +class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. + For more information about eviction see `spot VMs + `_. + """ + + DELETE = "Delete" + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" + DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" + + +class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The Virtual Machine Scale Set priority.""" + + SPOT = "Spot" + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" + REGULAR = "Regular" + """Regular VMs will be used.""" + + +class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of a snapshot. The default is NodePool.""" + + NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" + + +class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """For more information see `setting the AKS cluster auto-upgrade channel + `_. + """ + + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported + #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor + #: version where N is the latest supported minor version, the cluster first upgrades to the latest + #: supported patch version on N-1 minor version. For example, if a cluster is running version + #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: where N is the latest supported minor version. For example, if a cluster is running version + #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes + #: available while keeping the minor version the same. For example, if a cluster is running + #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Microsoft provides + #: patches and new images for image nodes frequently (usually weekly), but your running nodes + #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel + #: will automatically update your node images whenever a new version is available.""" + NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" + + +class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The weekday enum.""" + + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" + + +class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Determines the type of workload a node can run.""" + + OCI_CONTAINER = "OCIContainer" + """Nodes will use Kubelet to run standard OCI container workloads.""" + WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_models_py3.py new file mode 100644 index 000000000000..5a15eb671442 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_models_py3.py @@ -0,0 +1,6288 @@ +# coding=utf-8 +# pylint: disable=too-many-lines +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union + +from ... import _serialization + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from .. import models as _models + + +class SubResource(_serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): # pylint: disable=too-many-instance-attributes + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :vartype count: int + :ivar vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :vartype vm_size: str + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :vartype os_disk_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSDiskType + :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KubeletDiskType + :ivar workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer" and "WasmWasi". + :vartype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_01.models.WorkloadRuntime + :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnet_subnet_id: str + :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype pod_subnet_id: str + :ivar max_pods: The maximum number of pods that can run on a node. + :vartype max_pods: int + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is + Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and + "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSSKU + :ivar max_count: The maximum number of nodes for auto-scaling. + :vartype max_count: int + :ivar min_count: The minimum number of nodes for auto-scaling. + :vartype min_count: int + :ivar enable_auto_scaling: Whether to enable auto-scaler. + :vartype enable_auto_scaling: bool + :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Known values are: "Delete" and "Deallocate". + :vartype scale_down_mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.ScaleDownMode + :ivar type_properties_type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" + and "AvailabilitySet". + :vartype type_properties_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolType + :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :vartype mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolMode + :ivar orchestrator_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. As a best practice, you should upgrade all node pools in an AKS cluster + to the same Kubernetes version. The node pool version must have the same major version as the + control plane. The node pool minor version must be within two minor versions of the control + plane version. The node pool version cannot be greater than the control plane version. For more + information see `upgrading a node pool + `_. + :vartype orchestrator_version: str + :ivar current_orchestrator_version: If orchestratorVersion is a fully specified version + , this field will be exactly equal to it. If orchestratorVersion is + , this field will contain the full version being used. + :vartype current_orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar upgrade_settings: Settings for upgrading the agentpool. + :vartype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_01.models.PowerState + :ivar availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :vartype availability_zones: list[str] + :ivar enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :vartype enable_node_public_ip: bool + :ivar node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype node_public_ip_prefix_id: str + :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default + is 'Regular'. Known values are: "Spot" and "Regular". + :vartype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetPriority + :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :vartype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetEvictionPolicy + :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :vartype spot_max_price: float + :ivar tags: The tags to be persisted on the agent pool virtual machine scale set. + :vartype tags: dict[str, str] + :ivar node_labels: The node labels to be persisted across all nodes in agent pool. + :vartype node_labels: dict[str, str] + :ivar node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :vartype node_taints: list[str] + :ivar proximity_placement_group_id: The ID for Proximity Placement Group. + :vartype proximity_placement_group_id: str + :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. + :vartype kubelet_config: ~azure.mgmt.containerservice.v2023_01_01.models.KubeletConfig + :ivar linux_os_config: The OS configuration of Linux agent nodes. + :vartype linux_os_config: ~azure.mgmt.containerservice.v2023_01_01.models.LinuxOSConfig + :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :vartype enable_encryption_at_host: bool + :ivar enable_ultra_ssd: Whether to enable UltraSSD. + :vartype enable_ultra_ssd: bool + :ivar enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :vartype enable_fips: bool + :ivar gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.GPUInstanceProfile + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :ivar host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :vartype host_group_id: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "count": {"key": "properties.count", "type": "int"}, + "vm_size": {"key": "properties.vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "properties.osDiskSizeGB", "type": "int"}, + "os_disk_type": {"key": "properties.osDiskType", "type": "str"}, + "kubelet_disk_type": {"key": "properties.kubeletDiskType", "type": "str"}, + "workload_runtime": {"key": "properties.workloadRuntime", "type": "str"}, + "vnet_subnet_id": {"key": "properties.vnetSubnetID", "type": "str"}, + "pod_subnet_id": {"key": "properties.podSubnetID", "type": "str"}, + "max_pods": {"key": "properties.maxPods", "type": "int"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "os_sku": {"key": "properties.osSKU", "type": "str"}, + "max_count": {"key": "properties.maxCount", "type": "int"}, + "min_count": {"key": "properties.minCount", "type": "int"}, + "enable_auto_scaling": {"key": "properties.enableAutoScaling", "type": "bool"}, + "scale_down_mode": {"key": "properties.scaleDownMode", "type": "str"}, + "type_properties_type": {"key": "properties.type", "type": "str"}, + "mode": {"key": "properties.mode", "type": "str"}, + "orchestrator_version": {"key": "properties.orchestratorVersion", "type": "str"}, + "current_orchestrator_version": {"key": "properties.currentOrchestratorVersion", "type": "str"}, + "node_image_version": {"key": "properties.nodeImageVersion", "type": "str"}, + "upgrade_settings": {"key": "properties.upgradeSettings", "type": "AgentPoolUpgradeSettings"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "power_state": {"key": "properties.powerState", "type": "PowerState"}, + "availability_zones": {"key": "properties.availabilityZones", "type": "[str]"}, + "enable_node_public_ip": {"key": "properties.enableNodePublicIP", "type": "bool"}, + "node_public_ip_prefix_id": {"key": "properties.nodePublicIPPrefixID", "type": "str"}, + "scale_set_priority": {"key": "properties.scaleSetPriority", "type": "str"}, + "scale_set_eviction_policy": {"key": "properties.scaleSetEvictionPolicy", "type": "str"}, + "spot_max_price": {"key": "properties.spotMaxPrice", "type": "float"}, + "tags": {"key": "properties.tags", "type": "{str}"}, + "node_labels": {"key": "properties.nodeLabels", "type": "{str}"}, + "node_taints": {"key": "properties.nodeTaints", "type": "[str]"}, + "proximity_placement_group_id": {"key": "properties.proximityPlacementGroupID", "type": "str"}, + "kubelet_config": {"key": "properties.kubeletConfig", "type": "KubeletConfig"}, + "linux_os_config": {"key": "properties.linuxOSConfig", "type": "LinuxOSConfig"}, + "enable_encryption_at_host": {"key": "properties.enableEncryptionAtHost", "type": "bool"}, + "enable_ultra_ssd": {"key": "properties.enableUltraSSD", "type": "bool"}, + "enable_fips": {"key": "properties.enableFIPS", "type": "bool"}, + "gpu_instance_profile": {"key": "properties.gpuInstanceProfile", "type": "str"}, + "creation_data": {"key": "properties.creationData", "type": "CreationData"}, + "host_group_id": {"key": "properties.hostGroupID", "type": "str"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Union[str, "_models.OSType"] = "Linux", + os_sku: Optional[Union[str, "_models.OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "_models.ScaleDownMode"]] = None, + type_properties_type: Optional[Union[str, "_models.AgentPoolType"]] = None, + mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + power_state: Optional["_models.PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", + scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", + spot_max_price: float = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["_models.KubeletConfig"] = None, + linux_os_config: Optional["_models.LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, + creation_data: Optional["_models.CreationData"] = None, + host_group_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :paramtype count: int + :keyword vm_size: VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :paramtype vm_size: str + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :paramtype os_disk_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSDiskType + :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime + data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :paramtype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KubeletDiskType + :keyword workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer" and "WasmWasi". + :paramtype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_01.models.WorkloadRuntime + :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and + used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to + just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype vnet_subnet_id: str + :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype pod_subnet_id: str + :keyword max_pods: The maximum number of pods that can run on a node. + :paramtype max_pods: int + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :keyword os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType + is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and + "Windows2022". + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSSKU + :keyword max_count: The maximum number of nodes for auto-scaling. + :paramtype max_count: int + :keyword min_count: The minimum number of nodes for auto-scaling. + :paramtype min_count: int + :keyword enable_auto_scaling: Whether to enable auto-scaler. + :paramtype enable_auto_scaling: bool + :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, + it defaults to Delete. Known values are: "Delete" and "Deallocate". + :paramtype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleDownMode + :keyword type_properties_type: The type of Agent Pool. Known values are: + "VirtualMachineScaleSets" and "AvailabilitySet". + :paramtype type_properties_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolType + :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For + additional information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :paramtype mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolMode + :keyword orchestrator_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. As a best practice, you should upgrade all node pools in an AKS cluster + to the same Kubernetes version. The node pool version must have the same major version as the + control plane. The node pool minor version must be within two minor versions of the control + plane version. The node pool version cannot be greater than the control plane version. For more + information see `upgrading a node pool + `_. + :paramtype orchestrator_version: str + :keyword upgrade_settings: Settings for upgrading the agentpool. + :paramtype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeSettings + :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent + Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs + and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :paramtype power_state: ~azure.mgmt.containerservice.v2023_01_01.models.PowerState + :keyword availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :paramtype availability_zones: list[str] + :keyword enable_node_public_ip: Some scenarios may require nodes in a node pool to receive + their own dedicated public IP addresses. A common scenario is for gaming workloads, where a + console needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :paramtype enable_node_public_ip: bool + :keyword node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :paramtype node_public_ip_prefix_id: str + :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Known values are: "Spot" and "Regular". + :paramtype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetPriority + :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :paramtype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetEvictionPolicy + :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :paramtype spot_max_price: float + :keyword tags: The tags to be persisted on the agent pool virtual machine scale set. + :paramtype tags: dict[str, str] + :keyword node_labels: The node labels to be persisted across all nodes in agent pool. + :paramtype node_labels: dict[str, str] + :keyword node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :paramtype node_taints: list[str] + :keyword proximity_placement_group_id: The ID for Proximity Placement Group. + :paramtype proximity_placement_group_id: str + :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. + :paramtype kubelet_config: ~azure.mgmt.containerservice.v2023_01_01.models.KubeletConfig + :keyword linux_os_config: The OS configuration of Linux agent nodes. + :paramtype linux_os_config: ~azure.mgmt.containerservice.v2023_01_01.models.LinuxOSConfig + :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :paramtype enable_encryption_at_host: bool + :keyword enable_ultra_ssd: Whether to enable UltraSSD. + :paramtype enable_ultra_ssd: bool + :keyword enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :paramtype enable_fips: bool + :keyword gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance + profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and + "MIG7g". + :paramtype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.GPUInstanceProfile + :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :keyword host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :paramtype host_group_id: str + """ + super().__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.kubelet_disk_type = kubelet_disk_type + self.workload_runtime = workload_runtime + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.os_sku = os_sku + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.scale_down_mode = scale_down_mode + self.type_properties_type = type_properties_type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.current_orchestrator_version = None + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = power_state + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.node_public_ip_prefix_id = node_public_ip_prefix_id + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + self.enable_encryption_at_host = enable_encryption_at_host + self.enable_ultra_ssd = enable_ultra_ssd + self.enable_fips = enable_fips + self.gpu_instance_profile = gpu_instance_profile + self.creation_data = creation_data + self.host_group_id = host_group_id + + +class AgentPoolAvailableVersions(_serialization.Model): + """The list of available versions for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the agent pool version list. + :vartype id: str + :ivar name: The name of the agent pool version list. + :vartype name: str + :ivar type: Type of the agent pool version list. + :vartype type: str + :ivar agent_pool_versions: List of versions available for agent pool. + :vartype agent_pool_versions: + list[~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "agent_pool_versions": { + "key": "properties.agentPoolVersions", + "type": "[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]", + }, + } + + def __init__( + self, + *, + agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword agent_pool_versions: List of versions available for agent pool. + :paramtype agent_pool_versions: + list[~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.agent_pool_versions = agent_pool_versions + + +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(_serialization.Model): + """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + + :ivar default: Whether this version is the default agent pool version. + :vartype default: bool + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). + :vartype kubernetes_version: str + :ivar is_preview: Whether Kubernetes version is currently in preview. + :vartype is_preview: bool + """ + + _attribute_map = { + "default": {"key": "default", "type": "bool"}, + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "is_preview": {"key": "isPreview", "type": "bool"}, + } + + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword default: Whether this version is the default agent pool version. + :paramtype default: bool + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). + :paramtype kubernetes_version: str + :keyword is_preview: Whether Kubernetes version is currently in preview. + :paramtype is_preview: bool + """ + super().__init__(**kwargs) + self.default = default + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolListResult(_serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of agent pools. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[AgentPool]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of agent pools. + :paramtype value: list[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolUpgradeProfile(_serialization.Model): + """The list of available upgrades for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the agent pool upgrade profile. + :vartype id: str + :ivar name: The name of the agent pool upgrade profile. + :vartype name: str + :ivar type: The type of the agent pool upgrade profile. + :vartype type: str + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :vartype kubernetes_version: str + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :ivar upgrades: List of orchestrator types and versions available for upgrade. + :vartype upgrades: + list[~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :ivar latest_node_image_version: The latest AKS supported node image version. + :vartype latest_node_image_version: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kubernetes_version": {"required": True}, + "os_type": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "upgrades": {"key": "properties.upgrades", "type": "[AgentPoolUpgradeProfilePropertiesUpgradesItem]"}, + "latest_node_image_version": {"key": "properties.latestNodeImageVersion", "type": "str"}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "_models.OSType"] = "Linux", + upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :paramtype kubernetes_version: str + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :keyword upgrades: List of orchestrator types and versions available for upgrade. + :paramtype upgrades: + list[~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :keyword latest_node_image_version: The latest AKS supported node image version. + :paramtype latest_node_image_version: str + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kubernetes_version = kubernetes_version + self.os_type = os_type + self.upgrades = upgrades + self.latest_node_image_version = latest_node_image_version + + +class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): + """AgentPoolUpgradeProfilePropertiesUpgradesItem. + + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). + :vartype kubernetes_version: str + :ivar is_preview: Whether the Kubernetes version is currently in preview. + :vartype is_preview: bool + """ + + _attribute_map = { + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "is_preview": {"key": "isPreview", "type": "bool"}, + } + + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). + :paramtype kubernetes_version: str + :keyword is_preview: Whether the Kubernetes version is currently in preview. + :paramtype is_preview: bool + """ + super().__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolUpgradeSettings(_serialization.Model): + """Settings for upgrading an agentpool. + + :ivar max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). + If a percentage is specified, it is the percentage of the total agent pool size at the time of + the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is + 1. For more information, including best practices, see: + https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + :vartype max_surge: str + """ + + _attribute_map = { + "max_surge": {"key": "maxSurge", "type": "str"}, + } + + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. + '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the + time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the + default is 1. For more information, including best practices, see: + https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + :paramtype max_surge: str + """ + super().__init__(**kwargs) + self.max_surge = max_surge + + +class AzureKeyVaultKms(_serialization.Model): + """Azure Key Vault key management service settings for the security profile. + + :ivar enabled: Whether to enable Azure Key Vault key management service. The default is false. + :vartype enabled: bool + :ivar key_id: Identifier of Azure Key Vault key. See `key identifier format + `_ + for more details. When Azure Key Vault key management service is enabled, this field is + required and must be a valid key identifier. When Azure Key Vault key management service is + disabled, leave the field empty. + :vartype key_id: str + :ivar key_vault_network_access: Network access of key vault. The possible values are ``Public`` + and ``Private``. ``Public`` means the key vault allows public access from all networks. + ``Private`` means the key vault disables public access and enables private link. The default + value is ``Public``. Known values are: "Public" and "Private". + :vartype key_vault_network_access: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KeyVaultNetworkAccessTypes + :ivar key_vault_resource_id: Resource ID of key vault. When keyVaultNetworkAccess is + ``Private``\ , this field is required and must be a valid resource ID. When + keyVaultNetworkAccess is ``Public``\ , leave the field empty. + :vartype key_vault_resource_id: str + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "key_id": {"key": "keyId", "type": "str"}, + "key_vault_network_access": {"key": "keyVaultNetworkAccess", "type": "str"}, + "key_vault_resource_id": {"key": "keyVaultResourceId", "type": "str"}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + key_id: Optional[str] = None, + key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", + key_vault_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether to enable Azure Key Vault key management service. The default is + false. + :paramtype enabled: bool + :keyword key_id: Identifier of Azure Key Vault key. See `key identifier format + `_ + for more details. When Azure Key Vault key management service is enabled, this field is + required and must be a valid key identifier. When Azure Key Vault key management service is + disabled, leave the field empty. + :paramtype key_id: str + :keyword key_vault_network_access: Network access of key vault. The possible values are + ``Public`` and ``Private``. ``Public`` means the key vault allows public access from all + networks. ``Private`` means the key vault disables public access and enables private link. The + default value is ``Public``. Known values are: "Public" and "Private". + :paramtype key_vault_network_access: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KeyVaultNetworkAccessTypes + :keyword key_vault_resource_id: Resource ID of key vault. When keyVaultNetworkAccess is + ``Private``\ , this field is required and must be a valid resource ID. When + keyVaultNetworkAccess is ``Public``\ , leave the field empty. + :paramtype key_vault_resource_id: str + """ + super().__init__(**kwargs) + self.enabled = enabled + self.key_id = key_id + self.key_vault_network_access = key_vault_network_access + self.key_vault_resource_id = key_vault_resource_id + + +class CloudErrorBody(_serialization.Model): + """An error response from the Container service. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of the property in + error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: list[~azure.mgmt.containerservice.v2023_01_01.models.CloudErrorBody] + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[CloudErrorBody]"}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["_models.CloudErrorBody"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :paramtype code: str + :keyword message: A message describing the error, intended to be suitable for display in a user + interface. + :paramtype message: str + :keyword target: The target of the particular error. For example, the name of the property in + error. + :paramtype target: str + :keyword details: A list of additional details about the error. + :paramtype details: list[~azure.mgmt.containerservice.v2023_01_01.models.CloudErrorBody] + """ + super().__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ContainerServiceDiagnosticsProfile(_serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar vm_diagnostics: Profile for diagnostics on the container service VMs. Required. + :vartype vm_diagnostics: + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + "vm_diagnostics": {"required": True}, + } + + _attribute_map = { + "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, + } + + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: + """ + :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. + :paramtype vm_diagnostics: + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceVMDiagnostics + """ + super().__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(_serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar admin_username: The administrator username to use for Linux VMs. Required. + :vartype admin_username: str + :ivar ssh: The SSH configuration for Linux-based VMs running on Azure. Required. + :vartype ssh: ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + "admin_username": {"required": True, "pattern": r"^[A-Za-z][-A-Za-z0-9_]*$"}, + "ssh": {"required": True}, + } + + _attribute_map = { + "admin_username": {"key": "adminUsername", "type": "str"}, + "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, + } + + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: + """ + :keyword admin_username: The administrator username to use for Linux VMs. Required. + :paramtype admin_username: str + :keyword ssh: The SSH configuration for Linux-based VMs running on Azure. Required. + :paramtype ssh: + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceSshConfiguration + """ + super().__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceMasterProfile(_serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, + and 5. The default value is 1. Known values are: 1, 3, and 5. + :vartype count: int or ~azure.mgmt.containerservice.v2023_01_01.models.Count + :ivar dns_prefix: DNS prefix to be used to create the FQDN for the master pool. Required. + :vartype dns_prefix: str + :ivar vm_size: Size of agent VMs. Required. Known values are: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", and "Standard_NV6". + :vartype vm_size: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceVMSizeTypes + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in this master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :vartype vnet_subnet_id: str + :ivar first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static ip + of masters. + :vartype first_consecutive_static_ip: str + :ivar storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Known values are: "StorageAccount" and "ManagedDisks". + :vartype storage_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + "dns_prefix": {"required": True}, + "vm_size": {"required": True}, + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "fqdn": {"readonly": True}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "dns_prefix": {"key": "dnsPrefix", "type": "str"}, + "vm_size": {"key": "vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, + "vnet_subnet_id": {"key": "vnetSubnetID", "type": "str"}, + "first_consecutive_static_ip": {"key": "firstConsecutiveStaticIP", "type": "str"}, + "storage_profile": {"key": "storageProfile", "type": "str"}, + "fqdn": {"key": "fqdn", "type": "str"}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "_models.ContainerServiceVMSizeTypes"], + count: Union[int, "_models.Count"] = 1, + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: str = "10.240.255.5", + storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Known values are: 1, 3, and 5. + :paramtype count: int or ~azure.mgmt.containerservice.v2023_01_01.models.Count + :keyword dns_prefix: DNS prefix to be used to create the FQDN for the master pool. Required. + :paramtype dns_prefix: str + :keyword vm_size: Size of agent VMs. Required. Known values are: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", and "Standard_NV6". + :paramtype vm_size: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceVMSizeTypes + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :paramtype vnet_subnet_id: str + :keyword first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :paramtype first_consecutive_static_ip: str + :keyword storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Known values are: "StorageAccount" and "ManagedDisks". + :paramtype storage_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceStorageProfileTypes + """ + super().__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceNetworkProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Profile of network configuration. + + :ivar network_plugin: Network plugin used for building the Kubernetes network. Known values + are: "azure", "kubenet", and "none". + :vartype network_plugin: str or ~azure.mgmt.containerservice.v2023_01_01.models.NetworkPlugin + :ivar network_policy: Network policy used for building the Kubernetes network. Known values + are: "calico" and "azure". + :vartype network_policy: str or ~azure.mgmt.containerservice.v2023_01_01.models.NetworkPolicy + :ivar network_mode: This cannot be specified if networkPlugin is anything other than 'azure'. + Known values are: "transparent" and "bridge". + :vartype network_mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.NetworkMode + :ivar pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :vartype pod_cidr: str + :ivar service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :vartype service_cidr: str + :ivar dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :vartype dns_service_ip: str + :ivar docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :vartype docker_bridge_cidr: str + :ivar outbound_type: This can only be set at cluster creation time and cannot be changed later. + For more information see `egress outbound type + `_. Known values are: "loadBalancer", + "userDefinedRouting", "managedNATGateway", and "userAssignedNATGateway". + :vartype outbound_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OutboundType + :ivar load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. Known values are: "standard" and "basic". + :vartype load_balancer_sku: str or + ~azure.mgmt.containerservice.v2023_01_01.models.LoadBalancerSku + :ivar load_balancer_profile: Profile of the cluster load balancer. + :vartype load_balancer_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfile + :ivar nat_gateway_profile: Profile of the cluster NAT gateway. + :vartype nat_gateway_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterNATGatewayProfile + :ivar pod_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each + IP family (IPv4/IPv6), is expected for dual-stack networking. + :vartype pod_cidrs: list[str] + :ivar service_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for + each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with + any Subnet IP ranges. + :vartype service_cidrs: list[str] + :ivar ip_families: IP families are used to determine single-stack or dual-stack clusters. For + single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and + IPv6. + :vartype ip_families: list[str or ~azure.mgmt.containerservice.v2023_01_01.models.IpFamily] + """ + + _validation = { + "pod_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, + "service_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, + "dns_service_ip": { + "pattern": r"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "docker_bridge_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, + } + + _attribute_map = { + "network_plugin": {"key": "networkPlugin", "type": "str"}, + "network_policy": {"key": "networkPolicy", "type": "str"}, + "network_mode": {"key": "networkMode", "type": "str"}, + "pod_cidr": {"key": "podCidr", "type": "str"}, + "service_cidr": {"key": "serviceCidr", "type": "str"}, + "dns_service_ip": {"key": "dnsServiceIP", "type": "str"}, + "docker_bridge_cidr": {"key": "dockerBridgeCidr", "type": "str"}, + "outbound_type": {"key": "outboundType", "type": "str"}, + "load_balancer_sku": {"key": "loadBalancerSku", "type": "str"}, + "load_balancer_profile": {"key": "loadBalancerProfile", "type": "ManagedClusterLoadBalancerProfile"}, + "nat_gateway_profile": {"key": "natGatewayProfile", "type": "ManagedClusterNATGatewayProfile"}, + "pod_cidrs": {"key": "podCidrs", "type": "[str]"}, + "service_cidrs": {"key": "serviceCidrs", "type": "[str]"}, + "ip_families": {"key": "ipFamilies", "type": "[str]"}, + } + + def __init__( + self, + *, + network_plugin: Union[str, "_models.NetworkPlugin"] = "kubenet", + network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, + pod_cidr: str = "10.244.0.0/16", + service_cidr: str = "10.0.0.0/16", + dns_service_ip: str = "10.0.0.10", + docker_bridge_cidr: str = "172.17.0.1/16", + outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, + load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, + nat_gateway_profile: Optional["_models.ManagedClusterNATGatewayProfile"] = None, + pod_cidrs: Optional[List[str]] = None, + service_cidrs: Optional[List[str]] = None, + ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, + **kwargs: Any + ) -> None: + """ + :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values + are: "azure", "kubenet", and "none". + :paramtype network_plugin: str or ~azure.mgmt.containerservice.v2023_01_01.models.NetworkPlugin + :keyword network_policy: Network policy used for building the Kubernetes network. Known values + are: "calico" and "azure". + :paramtype network_policy: str or ~azure.mgmt.containerservice.v2023_01_01.models.NetworkPolicy + :keyword network_mode: This cannot be specified if networkPlugin is anything other than + 'azure'. Known values are: "transparent" and "bridge". + :paramtype network_mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.NetworkMode + :keyword pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :paramtype pod_cidr: str + :keyword service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It + must not overlap with any Subnet IP ranges. + :paramtype service_cidr: str + :keyword dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be + within the Kubernetes service address range specified in serviceCidr. + :paramtype dns_service_ip: str + :keyword docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :paramtype docker_bridge_cidr: str + :keyword outbound_type: This can only be set at cluster creation time and cannot be changed + later. For more information see `egress outbound type + `_. Known values are: "loadBalancer", + "userDefinedRouting", "managedNATGateway", and "userAssignedNATGateway". + :paramtype outbound_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OutboundType + :keyword load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. Known values are: "standard" and "basic". + :paramtype load_balancer_sku: str or + ~azure.mgmt.containerservice.v2023_01_01.models.LoadBalancerSku + :keyword load_balancer_profile: Profile of the cluster load balancer. + :paramtype load_balancer_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfile + :keyword nat_gateway_profile: Profile of the cluster NAT gateway. + :paramtype nat_gateway_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterNATGatewayProfile + :keyword pod_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for + each IP family (IPv4/IPv6), is expected for dual-stack networking. + :paramtype pod_cidrs: list[str] + :keyword service_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one + for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap + with any Subnet IP ranges. + :paramtype service_cidrs: list[str] + :keyword ip_families: IP families are used to determine single-stack or dual-stack clusters. + For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and + IPv6. + :paramtype ip_families: list[str or ~azure.mgmt.containerservice.v2023_01_01.models.IpFamily] + """ + super().__init__(**kwargs) + self.network_plugin = network_plugin + self.network_policy = network_policy + self.network_mode = network_mode + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + self.outbound_type = outbound_type + self.load_balancer_sku = load_balancer_sku + self.load_balancer_profile = load_balancer_profile + self.nat_gateway_profile = nat_gateway_profile + self.pod_cidrs = pod_cidrs + self.service_cidrs = service_cidrs + self.ip_families = ip_families + + +class ContainerServiceSshConfiguration(_serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :ivar public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A + maximum of 1 key may be specified. Required. + :vartype public_keys: + list[~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + "public_keys": {"required": True}, + } + + _attribute_map = { + "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, + } + + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: + """ + :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A + maximum of 1 key may be specified. Required. + :paramtype public_keys: + list[~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceSshPublicKey] + """ + super().__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(_serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :ivar key_data: Certificate public key used to authenticate with VMs through SSH. The + certificate must be in PEM format with or without headers. Required. + :vartype key_data: str + """ + + _validation = { + "key_data": {"required": True}, + } + + _attribute_map = { + "key_data": {"key": "keyData", "type": "str"}, + } + + def __init__(self, *, key_data: str, **kwargs: Any) -> None: + """ + :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The + certificate must be in PEM format with or without headers. Required. + :paramtype key_data: str + """ + super().__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(_serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. + :vartype enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + "enabled": {"required": True}, + "storage_uri": {"readonly": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "storage_uri": {"key": "storageUri", "type": "str"}, + } + + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: + """ + :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class CreationData(_serialization.Model): + """Data used when creating a target resource from a source resource. + + :ivar source_resource_id: This is the ARM ID of the source object to be used to create the + target object. + :vartype source_resource_id: str + """ + + _attribute_map = { + "source_resource_id": {"key": "sourceResourceId", "type": "str"}, + } + + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword source_resource_id: This is the ARM ID of the source object to be used to create the + target object. + :paramtype source_resource_id: str + """ + super().__init__(**kwargs) + self.source_resource_id = source_resource_id + + +class CredentialResult(_serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytes + """ + + _validation = { + "name": {"readonly": True}, + "value": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "bytearray"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(_serialization.Model): + """The list credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2023_01_01.models.CredentialResult] + """ + + _validation = { + "kubeconfigs": {"readonly": True}, + } + + _attribute_map = { + "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.kubeconfigs = None + + +class EndpointDependency(_serialization.Model): + """A domain name that AKS agent nodes are reaching at. + + :ivar domain_name: The domain name of the dependency. + :vartype domain_name: str + :ivar endpoint_details: The Ports and Protocols used when connecting to domainName. + :vartype endpoint_details: list[~azure.mgmt.containerservice.v2023_01_01.models.EndpointDetail] + """ + + _attribute_map = { + "domain_name": {"key": "domainName", "type": "str"}, + "endpoint_details": {"key": "endpointDetails", "type": "[EndpointDetail]"}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["_models.EndpointDetail"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword domain_name: The domain name of the dependency. + :paramtype domain_name: str + :keyword endpoint_details: The Ports and Protocols used when connecting to domainName. + :paramtype endpoint_details: + list[~azure.mgmt.containerservice.v2023_01_01.models.EndpointDetail] + """ + super().__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(_serialization.Model): + """connect information from the AKS agent nodes to a single endpoint. + + :ivar ip_address: An IP Address that Domain Name currently resolves to. + :vartype ip_address: str + :ivar port: The port an endpoint is connected to. + :vartype port: int + :ivar protocol: The protocol used for connection. + :vartype protocol: str + :ivar description: Description of the detail. + :vartype description: str + """ + + _attribute_map = { + "ip_address": {"key": "ipAddress", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "protocol": {"key": "protocol", "type": "str"}, + "description": {"key": "description", "type": "str"}, + } + + def __init__( + self, + *, + ip_address: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword ip_address: An IP Address that Domain Name currently resolves to. + :paramtype ip_address: str + :keyword port: The port an endpoint is connected to. + :paramtype port: int + :keyword protocol: The protocol used for connection. + :paramtype protocol: str + :keyword description: Description of the detail. + :paramtype description: str + """ + super().__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.protocol = protocol + self.description = description + + +class ExtendedLocation(_serialization.Model): + """The complex type of the extended location. + + :ivar name: The name of the extended location. + :vartype name: str + :ivar type: The type of the extended location. "EdgeZone" + :vartype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.ExtendedLocationTypes + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the extended location. + :paramtype name: str + :keyword type: The type of the extended location. "EdgeZone" + :paramtype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.ExtendedLocationTypes + """ + super().__init__(**kwargs) + self.name = name + self.type = type + + +class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes + """See `AKS custom node configuration + `_ for more details. + + :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'. + :vartype cpu_manager_policy: str + :ivar cpu_cfs_quota: The default is true. + :vartype cpu_cfs_quota: bool + :ivar cpu_cfs_quota_period: The default is '100ms.' Valid values are a sequence of decimal + numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + :vartype cpu_cfs_quota_period: str + :ivar image_gc_high_threshold: To disable image garbage collection, set to 100. The default is + 85%. + :vartype image_gc_high_threshold: int + :ivar image_gc_low_threshold: This cannot be set higher than imageGcHighThreshold. The default + is 80%. + :vartype image_gc_low_threshold: int + :ivar topology_manager_policy: For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + :vartype topology_manager_policy: str + :ivar allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending + in ``*``\ ). + :vartype allowed_unsafe_sysctls: list[str] + :ivar fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled on + the node. + :vartype fail_swap_on: bool + :ivar container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. + :vartype container_log_max_size_mb: int + :ivar container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. + :vartype container_log_max_files: int + :ivar pod_max_pids: The maximum number of processes per pod. + :vartype pod_max_pids: int + """ + + _validation = { + "container_log_max_files": {"minimum": 2}, + } + + _attribute_map = { + "cpu_manager_policy": {"key": "cpuManagerPolicy", "type": "str"}, + "cpu_cfs_quota": {"key": "cpuCfsQuota", "type": "bool"}, + "cpu_cfs_quota_period": {"key": "cpuCfsQuotaPeriod", "type": "str"}, + "image_gc_high_threshold": {"key": "imageGcHighThreshold", "type": "int"}, + "image_gc_low_threshold": {"key": "imageGcLowThreshold", "type": "int"}, + "topology_manager_policy": {"key": "topologyManagerPolicy", "type": "str"}, + "allowed_unsafe_sysctls": {"key": "allowedUnsafeSysctls", "type": "[str]"}, + "fail_swap_on": {"key": "failSwapOn", "type": "bool"}, + "container_log_max_size_mb": {"key": "containerLogMaxSizeMB", "type": "int"}, + "container_log_max_files": {"key": "containerLogMaxFiles", "type": "int"}, + "pod_max_pids": {"key": "podMaxPids", "type": "int"}, + } + + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + container_log_max_size_mb: Optional[int] = None, + container_log_max_files: Optional[int] = None, + pod_max_pids: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'. + :paramtype cpu_manager_policy: str + :keyword cpu_cfs_quota: The default is true. + :paramtype cpu_cfs_quota: bool + :keyword cpu_cfs_quota_period: The default is '100ms.' Valid values are a sequence of decimal + numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + :paramtype cpu_cfs_quota_period: str + :keyword image_gc_high_threshold: To disable image garbage collection, set to 100. The default + is 85%. + :paramtype image_gc_high_threshold: int + :keyword image_gc_low_threshold: This cannot be set higher than imageGcHighThreshold. The + default is 80%. + :paramtype image_gc_low_threshold: int + :keyword topology_manager_policy: For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + :paramtype topology_manager_policy: str + :keyword allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns + (ending in ``*``\ ). + :paramtype allowed_unsafe_sysctls: list[str] + :keyword fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. + :paramtype fail_swap_on: bool + :keyword container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before + it is rotated. + :paramtype container_log_max_size_mb: int + :keyword container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. + :paramtype container_log_max_files: int + :keyword pod_max_pids: The maximum number of processes per pod. + :paramtype pod_max_pids: int + """ + super().__init__(**kwargs) + self.cpu_manager_policy = cpu_manager_policy + self.cpu_cfs_quota = cpu_cfs_quota + self.cpu_cfs_quota_period = cpu_cfs_quota_period + self.image_gc_high_threshold = image_gc_high_threshold + self.image_gc_low_threshold = image_gc_low_threshold + self.topology_manager_policy = topology_manager_policy + self.allowed_unsafe_sysctls = allowed_unsafe_sysctls + self.fail_swap_on = fail_swap_on + self.container_log_max_size_mb = container_log_max_size_mb + self.container_log_max_files = container_log_max_files + self.pod_max_pids = pod_max_pids + + +class LinuxOSConfig(_serialization.Model): + """See `AKS custom node configuration + `_ for more details. + + :ivar sysctls: Sysctl settings for Linux agent nodes. + :vartype sysctls: ~azure.mgmt.containerservice.v2023_01_01.models.SysctlConfig + :ivar transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The + default is 'always'. For more information see `Transparent Hugepages + `_. + :vartype transparent_huge_page_enabled: str + :ivar transparent_huge_page_defrag: Valid values are 'always', 'defer', 'defer+madvise', + 'madvise' and 'never'. The default is 'madvise'. For more information see `Transparent + Hugepages + `_. + :vartype transparent_huge_page_defrag: str + :ivar swap_file_size_mb: The size in MB of a swap file that will be created on each node. + :vartype swap_file_size_mb: int + """ + + _attribute_map = { + "sysctls": {"key": "sysctls", "type": "SysctlConfig"}, + "transparent_huge_page_enabled": {"key": "transparentHugePageEnabled", "type": "str"}, + "transparent_huge_page_defrag": {"key": "transparentHugePageDefrag", "type": "str"}, + "swap_file_size_mb": {"key": "swapFileSizeMB", "type": "int"}, + } + + def __init__( + self, + *, + sysctls: Optional["_models.SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword sysctls: Sysctl settings for Linux agent nodes. + :paramtype sysctls: ~azure.mgmt.containerservice.v2023_01_01.models.SysctlConfig + :keyword transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The + default is 'always'. For more information see `Transparent Hugepages + `_. + :paramtype transparent_huge_page_enabled: str + :keyword transparent_huge_page_defrag: Valid values are 'always', 'defer', 'defer+madvise', + 'madvise' and 'never'. The default is 'madvise'. For more information see `Transparent + Hugepages + `_. + :paramtype transparent_huge_page_defrag: str + :keyword swap_file_size_mb: The size in MB of a swap file that will be created on each node. + :paramtype swap_file_size_mb: int + """ + super().__init__(**kwargs) + self.sysctls = sysctls + self.transparent_huge_page_enabled = transparent_huge_page_enabled + self.transparent_huge_page_defrag = transparent_huge_page_defrag + self.swap_file_size_mb = swap_file_size_mb + + +class MaintenanceConfiguration(SubResource): + """See `planned maintenance `_ for more + information about planned maintenance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_01.models.SystemData + :ivar time_in_week: If two array entries specify the same day of the week, the applied + configuration is the union of times in both entries. + :vartype time_in_week: list[~azure.mgmt.containerservice.v2023_01_01.models.TimeInWeek] + :ivar not_allowed_time: Time slots on which upgrade is not allowed. + :vartype not_allowed_time: list[~azure.mgmt.containerservice.v2023_01_01.models.TimeSpan] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "time_in_week": {"key": "properties.timeInWeek", "type": "[TimeInWeek]"}, + "not_allowed_time": {"key": "properties.notAllowedTime", "type": "[TimeSpan]"}, + } + + def __init__( + self, + *, + time_in_week: Optional[List["_models.TimeInWeek"]] = None, + not_allowed_time: Optional[List["_models.TimeSpan"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword time_in_week: If two array entries specify the same day of the week, the applied + configuration is the union of times in both entries. + :paramtype time_in_week: list[~azure.mgmt.containerservice.v2023_01_01.models.TimeInWeek] + :keyword not_allowed_time: Time slots on which upgrade is not allowed. + :paramtype not_allowed_time: list[~azure.mgmt.containerservice.v2023_01_01.models.TimeSpan] + """ + super().__init__(**kwargs) + self.system_data = None + self.time_in_week = time_in_week + self.not_allowed_time = not_allowed_time + + +class MaintenanceConfigurationListResult(_serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of maintenance configurations. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[MaintenanceConfiguration]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of maintenance configurations. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class Resource(_serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_01.models.SystemData + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_01.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + } + + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + """ + super().__init__(**kwargs) + self.tags = tags + self.location = location + + +class ManagedCluster(TrackedResource): # pylint: disable=too-many-instance-attributes + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_01.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar sku: The managed cluster SKU. + :vartype sku: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSKU + :ivar extended_location: The extended location of the Virtual Machine. + :vartype extended_location: ~azure.mgmt.containerservice.v2023_01_01.models.ExtendedLocation + :ivar identity: The identity of the managed cluster, if configured. + :vartype identity: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current provisioning state. + :vartype provisioning_state: str + :ivar power_state: The Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :ivar kubernetes_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions + cannot be skipped. All upgrades must be performed sequentially by major version number. For + example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> + 1.16.x is not allowed. See `upgrading an AKS cluster + `_ for more details. + :vartype kubernetes_version: str + :ivar current_kubernetes_version: If kubernetesVersion was a fully specified version + , this field will be exactly equal to it. If kubernetesVersion was + , this field will contain the full version being used. + :vartype current_kubernetes_version: str + :ivar dns_prefix: This cannot be updated once the Managed Cluster has been created. + :vartype dns_prefix: str + :ivar fqdn_subdomain: This cannot be updated once the Managed Cluster has been created. + :vartype fqdn_subdomain: str + :ivar fqdn: The FQDN of the master pool. + :vartype fqdn: str + :ivar private_fqdn: The FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. + This special FQDN supports CORS, allowing the Azure Portal to function properly. + :vartype azure_portal_fqdn: str + :ivar agent_pool_profiles: The agent pool properties. + :vartype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAgentPoolProfile] + :ivar linux_profile: The profile for Linux VMs in the Managed Cluster. + :vartype linux_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceLinuxProfile + :ivar windows_profile: The profile for Windows VMs in the Managed Cluster. + :vartype windows_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterWindowsProfile + :ivar service_principal_profile: Information about a service principal identity for the cluster + to use for manipulating Azure APIs. + :vartype service_principal_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterServicePrincipalProfile + :ivar addon_profiles: The profile of managed cluster add-on. + :vartype addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAddonProfile] + :ivar pod_identity_profile: See `use AAD pod identity + `_ for more details on AAD pod + identity integration. + :vartype pod_identity_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProfile + :ivar oidc_issuer_profile: The OIDC issuer profile of the Managed Cluster. + :vartype oidc_issuer_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterOIDCIssuerProfile + :ivar node_resource_group: The name of the resource group containing agent pool nodes. + :vartype node_resource_group: str + :ivar enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :vartype enable_rbac: bool + :ivar enable_pod_security_policy: (DEPRECATED) Whether to enable Kubernetes pod security policy + (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in + v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + :vartype enable_pod_security_policy: bool + :ivar network_profile: The network configuration profile. + :vartype network_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceNetworkProfile + :ivar aad_profile: The Azure Active Directory configuration. + :vartype aad_profile: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAADProfile + :ivar auto_upgrade_profile: The auto upgrade configuration. + :vartype auto_upgrade_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAutoUpgradeProfile + :ivar auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :vartype auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPropertiesAutoScalerProfile + :ivar api_server_access_profile: The access profile for managed cluster API server. + :vartype api_server_access_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAPIServerAccessProfile + :ivar disk_encryption_set_id: This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + :vartype disk_encryption_set_id: str + :ivar identity_profile: Identities associated with the cluster. + :vartype identity_profile: dict[str, + ~azure.mgmt.containerservice.v2023_01_01.models.UserAssignedIdentity] + :ivar private_link_resources: Private link resources associated with the cluster. + :vartype private_link_resources: + list[~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource] + :ivar disable_local_accounts: If set to true, getting static credentials will be disabled for + this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details + see `disable local accounts + `_. + :vartype disable_local_accounts: bool + :ivar http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :vartype http_proxy_config: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterHTTPProxyConfig + :ivar security_profile: Security profile for the managed cluster. + :vartype security_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSecurityProfile + :ivar storage_profile: Storage profile for the managed cluster. + :vartype storage_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfile + :ivar public_network_access: Allow or deny public network access for AKS. Known values are: + "Enabled" and "Disabled". + :vartype public_network_access: str or + ~azure.mgmt.containerservice.v2023_01_01.models.PublicNetworkAccess + :ivar workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. + :vartype workload_auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterWorkloadAutoScalerProfile + :ivar azure_monitor_profile: Azure Monitor addon profiles for monitoring the managed cluster. + :vartype azure_monitor_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAzureMonitorProfile + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "provisioning_state": {"readonly": True}, + "power_state": {"readonly": True}, + "max_agent_pools": {"readonly": True}, + "current_kubernetes_version": {"readonly": True}, + "fqdn": {"readonly": True}, + "private_fqdn": {"readonly": True}, + "azure_portal_fqdn": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "sku": {"key": "sku", "type": "ManagedClusterSKU"}, + "extended_location": {"key": "extendedLocation", "type": "ExtendedLocation"}, + "identity": {"key": "identity", "type": "ManagedClusterIdentity"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "power_state": {"key": "properties.powerState", "type": "PowerState"}, + "max_agent_pools": {"key": "properties.maxAgentPools", "type": "int"}, + "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, + "current_kubernetes_version": {"key": "properties.currentKubernetesVersion", "type": "str"}, + "dns_prefix": {"key": "properties.dnsPrefix", "type": "str"}, + "fqdn_subdomain": {"key": "properties.fqdnSubdomain", "type": "str"}, + "fqdn": {"key": "properties.fqdn", "type": "str"}, + "private_fqdn": {"key": "properties.privateFQDN", "type": "str"}, + "azure_portal_fqdn": {"key": "properties.azurePortalFQDN", "type": "str"}, + "agent_pool_profiles": {"key": "properties.agentPoolProfiles", "type": "[ManagedClusterAgentPoolProfile]"}, + "linux_profile": {"key": "properties.linuxProfile", "type": "ContainerServiceLinuxProfile"}, + "windows_profile": {"key": "properties.windowsProfile", "type": "ManagedClusterWindowsProfile"}, + "service_principal_profile": { + "key": "properties.servicePrincipalProfile", + "type": "ManagedClusterServicePrincipalProfile", + }, + "addon_profiles": {"key": "properties.addonProfiles", "type": "{ManagedClusterAddonProfile}"}, + "pod_identity_profile": {"key": "properties.podIdentityProfile", "type": "ManagedClusterPodIdentityProfile"}, + "oidc_issuer_profile": {"key": "properties.oidcIssuerProfile", "type": "ManagedClusterOIDCIssuerProfile"}, + "node_resource_group": {"key": "properties.nodeResourceGroup", "type": "str"}, + "enable_rbac": {"key": "properties.enableRBAC", "type": "bool"}, + "enable_pod_security_policy": {"key": "properties.enablePodSecurityPolicy", "type": "bool"}, + "network_profile": {"key": "properties.networkProfile", "type": "ContainerServiceNetworkProfile"}, + "aad_profile": {"key": "properties.aadProfile", "type": "ManagedClusterAADProfile"}, + "auto_upgrade_profile": {"key": "properties.autoUpgradeProfile", "type": "ManagedClusterAutoUpgradeProfile"}, + "auto_scaler_profile": { + "key": "properties.autoScalerProfile", + "type": "ManagedClusterPropertiesAutoScalerProfile", + }, + "api_server_access_profile": { + "key": "properties.apiServerAccessProfile", + "type": "ManagedClusterAPIServerAccessProfile", + }, + "disk_encryption_set_id": {"key": "properties.diskEncryptionSetID", "type": "str"}, + "identity_profile": {"key": "properties.identityProfile", "type": "{UserAssignedIdentity}"}, + "private_link_resources": {"key": "properties.privateLinkResources", "type": "[PrivateLinkResource]"}, + "disable_local_accounts": {"key": "properties.disableLocalAccounts", "type": "bool"}, + "http_proxy_config": {"key": "properties.httpProxyConfig", "type": "ManagedClusterHTTPProxyConfig"}, + "security_profile": {"key": "properties.securityProfile", "type": "ManagedClusterSecurityProfile"}, + "storage_profile": {"key": "properties.storageProfile", "type": "ManagedClusterStorageProfile"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "workload_auto_scaler_profile": { + "key": "properties.workloadAutoScalerProfile", + "type": "ManagedClusterWorkloadAutoScalerProfile", + }, + "azure_monitor_profile": {"key": "properties.azureMonitorProfile", "type": "ManagedClusterAzureMonitorProfile"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + sku: Optional["_models.ManagedClusterSKU"] = None, + extended_location: Optional["_models.ExtendedLocation"] = None, + identity: Optional["_models.ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + fqdn_subdomain: Optional[str] = None, + agent_pool_profiles: Optional[List["_models.ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["_models.ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["_models.ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["_models.ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "_models.ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["_models.ManagedClusterPodIdentityProfile"] = None, + oidc_issuer_profile: Optional["_models.ManagedClusterOIDCIssuerProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["_models.ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["_models.ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, + private_link_resources: Optional[List["_models.PrivateLinkResource"]] = None, + disable_local_accounts: Optional[bool] = None, + http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, + security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, + storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, + azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword sku: The managed cluster SKU. + :paramtype sku: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSKU + :keyword extended_location: The extended location of the Virtual Machine. + :paramtype extended_location: ~azure.mgmt.containerservice.v2023_01_01.models.ExtendedLocation + :keyword identity: The identity of the managed cluster, if configured. + :paramtype identity: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterIdentity + :keyword kubernetes_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions + cannot be skipped. All upgrades must be performed sequentially by major version number. For + example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> + 1.16.x is not allowed. See `upgrading an AKS cluster + `_ for more details. + :paramtype kubernetes_version: str + :keyword dns_prefix: This cannot be updated once the Managed Cluster has been created. + :paramtype dns_prefix: str + :keyword fqdn_subdomain: This cannot be updated once the Managed Cluster has been created. + :paramtype fqdn_subdomain: str + :keyword agent_pool_profiles: The agent pool properties. + :paramtype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAgentPoolProfile] + :keyword linux_profile: The profile for Linux VMs in the Managed Cluster. + :paramtype linux_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceLinuxProfile + :keyword windows_profile: The profile for Windows VMs in the Managed Cluster. + :paramtype windows_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterWindowsProfile + :keyword service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :paramtype service_principal_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterServicePrincipalProfile + :keyword addon_profiles: The profile of managed cluster add-on. + :paramtype addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAddonProfile] + :keyword pod_identity_profile: See `use AAD pod identity + `_ for more details on AAD pod + identity integration. + :paramtype pod_identity_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProfile + :keyword oidc_issuer_profile: The OIDC issuer profile of the Managed Cluster. + :paramtype oidc_issuer_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterOIDCIssuerProfile + :keyword node_resource_group: The name of the resource group containing agent pool nodes. + :paramtype node_resource_group: str + :keyword enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :paramtype enable_rbac: bool + :keyword enable_pod_security_policy: (DEPRECATED) Whether to enable Kubernetes pod security + policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from + Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + :paramtype enable_pod_security_policy: bool + :keyword network_profile: The network configuration profile. + :paramtype network_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ContainerServiceNetworkProfile + :keyword aad_profile: The Azure Active Directory configuration. + :paramtype aad_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAADProfile + :keyword auto_upgrade_profile: The auto upgrade configuration. + :paramtype auto_upgrade_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAutoUpgradeProfile + :keyword auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :paramtype auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPropertiesAutoScalerProfile + :keyword api_server_access_profile: The access profile for managed cluster API server. + :paramtype api_server_access_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAPIServerAccessProfile + :keyword disk_encryption_set_id: This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + :paramtype disk_encryption_set_id: str + :keyword identity_profile: Identities associated with the cluster. + :paramtype identity_profile: dict[str, + ~azure.mgmt.containerservice.v2023_01_01.models.UserAssignedIdentity] + :keyword private_link_resources: Private link resources associated with the cluster. + :paramtype private_link_resources: + list[~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource] + :keyword disable_local_accounts: If set to true, getting static credentials will be disabled + for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more + details see `disable local accounts + `_. + :paramtype disable_local_accounts: bool + :keyword http_proxy_config: Configurations for provisioning the cluster with HTTP proxy + servers. + :paramtype http_proxy_config: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterHTTPProxyConfig + :keyword security_profile: Security profile for the managed cluster. + :paramtype security_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSecurityProfile + :keyword storage_profile: Storage profile for the managed cluster. + :paramtype storage_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfile + :keyword public_network_access: Allow or deny public network access for AKS. Known values are: + "Enabled" and "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.containerservice.v2023_01_01.models.PublicNetworkAccess + :keyword workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. + :paramtype workload_auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterWorkloadAutoScalerProfile + :keyword azure_monitor_profile: Azure Monitor addon profiles for monitoring the managed + cluster. + :paramtype azure_monitor_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAzureMonitorProfile + """ + super().__init__(tags=tags, location=location, **kwargs) + self.sku = sku + self.extended_location = extended_location + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.current_kubernetes_version = None + self.dns_prefix = dns_prefix + self.fqdn_subdomain = fqdn_subdomain + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.oidc_issuer_profile = oidc_issuer_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + self.private_link_resources = private_link_resources + self.disable_local_accounts = disable_local_accounts + self.http_proxy_config = http_proxy_config + self.security_profile = security_profile + self.storage_profile = storage_profile + self.public_network_access = public_network_access + self.workload_auto_scaler_profile = workload_auto_scaler_profile + self.azure_monitor_profile = azure_monitor_profile + + +class ManagedClusterAADProfile(_serialization.Model): + """For more details see `managed AAD on AKS `_. + + :ivar managed: Whether to enable managed AAD. + :vartype managed: bool + :ivar enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :vartype enable_azure_rbac: bool + :ivar admin_group_object_i_ds: The list of AAD group object IDs that will have admin role of + the cluster. + :vartype admin_group_object_i_ds: list[str] + :ivar client_app_id: (DEPRECATED) The client AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :vartype client_app_id: str + :ivar server_app_id: (DEPRECATED) The server AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :vartype server_app_id: str + :ivar server_app_secret: (DEPRECATED) The server AAD application secret. Learn more at + https://aka.ms/aks/aad-legacy. + :vartype server_app_secret: str + :ivar tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :vartype tenant_id: str + """ + + _attribute_map = { + "managed": {"key": "managed", "type": "bool"}, + "enable_azure_rbac": {"key": "enableAzureRBAC", "type": "bool"}, + "admin_group_object_i_ds": {"key": "adminGroupObjectIDs", "type": "[str]"}, + "client_app_id": {"key": "clientAppID", "type": "str"}, + "server_app_id": {"key": "serverAppID", "type": "str"}, + "server_app_secret": {"key": "serverAppSecret", "type": "str"}, + "tenant_id": {"key": "tenantID", "type": "str"}, + } + + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword managed: Whether to enable managed AAD. + :paramtype managed: bool + :keyword enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :paramtype enable_azure_rbac: bool + :keyword admin_group_object_i_ds: The list of AAD group object IDs that will have admin role of + the cluster. + :paramtype admin_group_object_i_ds: list[str] + :keyword client_app_id: (DEPRECATED) The client AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :paramtype client_app_id: str + :keyword server_app_id: (DEPRECATED) The server AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :paramtype server_app_id: str + :keyword server_app_secret: (DEPRECATED) The server AAD application secret. Learn more at + https://aka.ms/aks/aad-legacy. + :paramtype server_app_secret: str + :keyword tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :paramtype tenant_id: str + """ + super().__init__(**kwargs) + self.managed = managed + self.enable_azure_rbac = enable_azure_rbac + self.admin_group_object_i_ds = admin_group_object_i_ds + self.client_app_id = client_app_id + self.server_app_id = server_app_id + self.server_app_secret = server_app_secret + self.tenant_id = tenant_id + + +class ManagedClusterAccessProfile(TrackedResource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_01.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar kube_config: Base64-encoded Kubernetes configuration file. + :vartype kube_config: bytes + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "kube_config": {"key": "properties.kubeConfig", "type": "bytearray"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword kube_config: Base64-encoded Kubernetes configuration file. + :paramtype kube_config: bytes + """ + super().__init__(tags=tags, location=location, **kwargs) + self.kube_config = kube_config + + +class ManagedClusterAddonProfile(_serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether the add-on is enabled or not. Required. + :vartype enabled: bool + :ivar config: Key-value pairs for configuring an add-on. + :vartype config: dict[str, str] + :ivar identity: Information of user assigned identity used by this add-on. + :vartype identity: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAddonProfileIdentity + """ + + _validation = { + "enabled": {"required": True}, + "identity": {"readonly": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "config": {"key": "config", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, + } + + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether the add-on is enabled or not. Required. + :paramtype enabled: bool + :keyword config: Key-value pairs for configuring an add-on. + :paramtype config: dict[str, str] + """ + super().__init__(**kwargs) + self.enabled = enabled + self.config = config + self.identity = None + + +class UserAssignedIdentity(_serialization.Model): + """Details about a user assigned identity. + + :ivar resource_id: The resource ID of the user assigned identity. + :vartype resource_id: str + :ivar client_id: The client ID of the user assigned identity. + :vartype client_id: str + :ivar object_id: The object ID of the user assigned identity. + :vartype object_id: str + """ + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "object_id": {"key": "objectId", "type": "str"}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword resource_id: The resource ID of the user assigned identity. + :paramtype resource_id: str + :keyword client_id: The client ID of the user assigned identity. + :paramtype client_id: str + :keyword object_id: The object ID of the user assigned identity. + :paramtype object_id: str + """ + super().__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): + """Information of user assigned identity used by this add-on. + + :ivar resource_id: The resource ID of the user assigned identity. + :vartype resource_id: str + :ivar client_id: The client ID of the user assigned identity. + :vartype client_id: str + :ivar object_id: The object ID of the user assigned identity. + :vartype object_id: str + """ + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "object_id": {"key": "objectId", "type": "str"}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword resource_id: The resource ID of the user assigned identity. + :paramtype resource_id: str + :keyword client_id: The client ID of the user assigned identity. + :paramtype client_id: str + :keyword object_id: The object ID of the user assigned identity. + :paramtype object_id: str + """ + super().__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ManagedClusterAgentPoolProfileProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :vartype count: int + :ivar vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :vartype vm_size: str + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :vartype os_disk_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSDiskType + :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KubeletDiskType + :ivar workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer" and "WasmWasi". + :vartype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_01.models.WorkloadRuntime + :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnet_subnet_id: str + :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype pod_subnet_id: str + :ivar max_pods: The maximum number of pods that can run on a node. + :vartype max_pods: int + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is + Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and + "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSSKU + :ivar max_count: The maximum number of nodes for auto-scaling. + :vartype max_count: int + :ivar min_count: The minimum number of nodes for auto-scaling. + :vartype min_count: int + :ivar enable_auto_scaling: Whether to enable auto-scaler. + :vartype enable_auto_scaling: bool + :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Known values are: "Delete" and "Deallocate". + :vartype scale_down_mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.ScaleDownMode + :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :vartype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolType + :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :vartype mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolMode + :ivar orchestrator_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. As a best practice, you should upgrade all node pools in an AKS cluster + to the same Kubernetes version. The node pool version must have the same major version as the + control plane. The node pool minor version must be within two minor versions of the control + plane version. The node pool version cannot be greater than the control plane version. For more + information see `upgrading a node pool + `_. + :vartype orchestrator_version: str + :ivar current_orchestrator_version: If orchestratorVersion is a fully specified version + , this field will be exactly equal to it. If orchestratorVersion is + , this field will contain the full version being used. + :vartype current_orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar upgrade_settings: Settings for upgrading the agentpool. + :vartype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_01.models.PowerState + :ivar availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :vartype availability_zones: list[str] + :ivar enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :vartype enable_node_public_ip: bool + :ivar node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype node_public_ip_prefix_id: str + :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default + is 'Regular'. Known values are: "Spot" and "Regular". + :vartype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetPriority + :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :vartype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetEvictionPolicy + :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :vartype spot_max_price: float + :ivar tags: The tags to be persisted on the agent pool virtual machine scale set. + :vartype tags: dict[str, str] + :ivar node_labels: The node labels to be persisted across all nodes in agent pool. + :vartype node_labels: dict[str, str] + :ivar node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :vartype node_taints: list[str] + :ivar proximity_placement_group_id: The ID for Proximity Placement Group. + :vartype proximity_placement_group_id: str + :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. + :vartype kubelet_config: ~azure.mgmt.containerservice.v2023_01_01.models.KubeletConfig + :ivar linux_os_config: The OS configuration of Linux agent nodes. + :vartype linux_os_config: ~azure.mgmt.containerservice.v2023_01_01.models.LinuxOSConfig + :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :vartype enable_encryption_at_host: bool + :ivar enable_ultra_ssd: Whether to enable UltraSSD. + :vartype enable_ultra_ssd: bool + :ivar enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :vartype enable_fips: bool + :ivar gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.GPUInstanceProfile + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :ivar host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :vartype host_group_id: str + """ + + _validation = { + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "vm_size": {"key": "vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, + "os_disk_type": {"key": "osDiskType", "type": "str"}, + "kubelet_disk_type": {"key": "kubeletDiskType", "type": "str"}, + "workload_runtime": {"key": "workloadRuntime", "type": "str"}, + "vnet_subnet_id": {"key": "vnetSubnetID", "type": "str"}, + "pod_subnet_id": {"key": "podSubnetID", "type": "str"}, + "max_pods": {"key": "maxPods", "type": "int"}, + "os_type": {"key": "osType", "type": "str"}, + "os_sku": {"key": "osSKU", "type": "str"}, + "max_count": {"key": "maxCount", "type": "int"}, + "min_count": {"key": "minCount", "type": "int"}, + "enable_auto_scaling": {"key": "enableAutoScaling", "type": "bool"}, + "scale_down_mode": {"key": "scaleDownMode", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, + "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, + "current_orchestrator_version": {"key": "currentOrchestratorVersion", "type": "str"}, + "node_image_version": {"key": "nodeImageVersion", "type": "str"}, + "upgrade_settings": {"key": "upgradeSettings", "type": "AgentPoolUpgradeSettings"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "power_state": {"key": "powerState", "type": "PowerState"}, + "availability_zones": {"key": "availabilityZones", "type": "[str]"}, + "enable_node_public_ip": {"key": "enableNodePublicIP", "type": "bool"}, + "node_public_ip_prefix_id": {"key": "nodePublicIPPrefixID", "type": "str"}, + "scale_set_priority": {"key": "scaleSetPriority", "type": "str"}, + "scale_set_eviction_policy": {"key": "scaleSetEvictionPolicy", "type": "str"}, + "spot_max_price": {"key": "spotMaxPrice", "type": "float"}, + "tags": {"key": "tags", "type": "{str}"}, + "node_labels": {"key": "nodeLabels", "type": "{str}"}, + "node_taints": {"key": "nodeTaints", "type": "[str]"}, + "proximity_placement_group_id": {"key": "proximityPlacementGroupID", "type": "str"}, + "kubelet_config": {"key": "kubeletConfig", "type": "KubeletConfig"}, + "linux_os_config": {"key": "linuxOSConfig", "type": "LinuxOSConfig"}, + "enable_encryption_at_host": {"key": "enableEncryptionAtHost", "type": "bool"}, + "enable_ultra_ssd": {"key": "enableUltraSSD", "type": "bool"}, + "enable_fips": {"key": "enableFIPS", "type": "bool"}, + "gpu_instance_profile": {"key": "gpuInstanceProfile", "type": "str"}, + "creation_data": {"key": "creationData", "type": "CreationData"}, + "host_group_id": {"key": "hostGroupID", "type": "str"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Union[str, "_models.OSType"] = "Linux", + os_sku: Optional[Union[str, "_models.OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "_models.ScaleDownMode"]] = None, + type: Optional[Union[str, "_models.AgentPoolType"]] = None, + mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + power_state: Optional["_models.PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", + scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", + spot_max_price: float = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["_models.KubeletConfig"] = None, + linux_os_config: Optional["_models.LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, + creation_data: Optional["_models.CreationData"] = None, + host_group_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :paramtype count: int + :keyword vm_size: VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :paramtype vm_size: str + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :paramtype os_disk_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSDiskType + :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime + data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :paramtype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KubeletDiskType + :keyword workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer" and "WasmWasi". + :paramtype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_01.models.WorkloadRuntime + :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and + used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to + just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype vnet_subnet_id: str + :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype pod_subnet_id: str + :keyword max_pods: The maximum number of pods that can run on a node. + :paramtype max_pods: int + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :keyword os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType + is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and + "Windows2022". + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSSKU + :keyword max_count: The maximum number of nodes for auto-scaling. + :paramtype max_count: int + :keyword min_count: The minimum number of nodes for auto-scaling. + :paramtype min_count: int + :keyword enable_auto_scaling: Whether to enable auto-scaler. + :paramtype enable_auto_scaling: bool + :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, + it defaults to Delete. Known values are: "Delete" and "Deallocate". + :paramtype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleDownMode + :keyword type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :paramtype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolType + :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For + additional information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :paramtype mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolMode + :keyword orchestrator_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. As a best practice, you should upgrade all node pools in an AKS cluster + to the same Kubernetes version. The node pool version must have the same major version as the + control plane. The node pool minor version must be within two minor versions of the control + plane version. The node pool version cannot be greater than the control plane version. For more + information see `upgrading a node pool + `_. + :paramtype orchestrator_version: str + :keyword upgrade_settings: Settings for upgrading the agentpool. + :paramtype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeSettings + :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent + Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs + and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :paramtype power_state: ~azure.mgmt.containerservice.v2023_01_01.models.PowerState + :keyword availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :paramtype availability_zones: list[str] + :keyword enable_node_public_ip: Some scenarios may require nodes in a node pool to receive + their own dedicated public IP addresses. A common scenario is for gaming workloads, where a + console needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :paramtype enable_node_public_ip: bool + :keyword node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :paramtype node_public_ip_prefix_id: str + :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Known values are: "Spot" and "Regular". + :paramtype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetPriority + :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :paramtype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetEvictionPolicy + :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :paramtype spot_max_price: float + :keyword tags: The tags to be persisted on the agent pool virtual machine scale set. + :paramtype tags: dict[str, str] + :keyword node_labels: The node labels to be persisted across all nodes in agent pool. + :paramtype node_labels: dict[str, str] + :keyword node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :paramtype node_taints: list[str] + :keyword proximity_placement_group_id: The ID for Proximity Placement Group. + :paramtype proximity_placement_group_id: str + :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. + :paramtype kubelet_config: ~azure.mgmt.containerservice.v2023_01_01.models.KubeletConfig + :keyword linux_os_config: The OS configuration of Linux agent nodes. + :paramtype linux_os_config: ~azure.mgmt.containerservice.v2023_01_01.models.LinuxOSConfig + :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :paramtype enable_encryption_at_host: bool + :keyword enable_ultra_ssd: Whether to enable UltraSSD. + :paramtype enable_ultra_ssd: bool + :keyword enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :paramtype enable_fips: bool + :keyword gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance + profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and + "MIG7g". + :paramtype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.GPUInstanceProfile + :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :keyword host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :paramtype host_group_id: str + """ + super().__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.kubelet_disk_type = kubelet_disk_type + self.workload_runtime = workload_runtime + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.os_sku = os_sku + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.scale_down_mode = scale_down_mode + self.type = type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.current_orchestrator_version = None + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = power_state + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.node_public_ip_prefix_id = node_public_ip_prefix_id + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + self.enable_encryption_at_host = enable_encryption_at_host + self.enable_ultra_ssd = enable_ultra_ssd + self.enable_fips = enable_fips + self.gpu_instance_profile = gpu_instance_profile + self.creation_data = creation_data + self.host_group_id = host_group_id + + +class ManagedClusterAgentPoolProfile( + ManagedClusterAgentPoolProfileProperties +): # pylint: disable=too-many-instance-attributes + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :vartype count: int + :ivar vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :vartype vm_size: str + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :vartype os_disk_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSDiskType + :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KubeletDiskType + :ivar workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer" and "WasmWasi". + :vartype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_01.models.WorkloadRuntime + :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnet_subnet_id: str + :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype pod_subnet_id: str + :ivar max_pods: The maximum number of pods that can run on a node. + :vartype max_pods: int + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is + Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and + "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSSKU + :ivar max_count: The maximum number of nodes for auto-scaling. + :vartype max_count: int + :ivar min_count: The minimum number of nodes for auto-scaling. + :vartype min_count: int + :ivar enable_auto_scaling: Whether to enable auto-scaler. + :vartype enable_auto_scaling: bool + :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Known values are: "Delete" and "Deallocate". + :vartype scale_down_mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.ScaleDownMode + :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :vartype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolType + :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :vartype mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolMode + :ivar orchestrator_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. As a best practice, you should upgrade all node pools in an AKS cluster + to the same Kubernetes version. The node pool version must have the same major version as the + control plane. The node pool minor version must be within two minor versions of the control + plane version. The node pool version cannot be greater than the control plane version. For more + information see `upgrading a node pool + `_. + :vartype orchestrator_version: str + :ivar current_orchestrator_version: If orchestratorVersion is a fully specified version + , this field will be exactly equal to it. If orchestratorVersion is + , this field will contain the full version being used. + :vartype current_orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar upgrade_settings: Settings for upgrading the agentpool. + :vartype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_01.models.PowerState + :ivar availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :vartype availability_zones: list[str] + :ivar enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :vartype enable_node_public_ip: bool + :ivar node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype node_public_ip_prefix_id: str + :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default + is 'Regular'. Known values are: "Spot" and "Regular". + :vartype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetPriority + :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :vartype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetEvictionPolicy + :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :vartype spot_max_price: float + :ivar tags: The tags to be persisted on the agent pool virtual machine scale set. + :vartype tags: dict[str, str] + :ivar node_labels: The node labels to be persisted across all nodes in agent pool. + :vartype node_labels: dict[str, str] + :ivar node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :vartype node_taints: list[str] + :ivar proximity_placement_group_id: The ID for Proximity Placement Group. + :vartype proximity_placement_group_id: str + :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. + :vartype kubelet_config: ~azure.mgmt.containerservice.v2023_01_01.models.KubeletConfig + :ivar linux_os_config: The OS configuration of Linux agent nodes. + :vartype linux_os_config: ~azure.mgmt.containerservice.v2023_01_01.models.LinuxOSConfig + :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :vartype enable_encryption_at_host: bool + :ivar enable_ultra_ssd: Whether to enable UltraSSD. + :vartype enable_ultra_ssd: bool + :ivar enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :vartype enable_fips: bool + :ivar gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.GPUInstanceProfile + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :ivar host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :vartype host_group_id: str + :ivar name: Windows agent pool names must be 6 characters or less. Required. + :vartype name: str + """ + + _validation = { + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "name": {"required": True, "pattern": r"^[a-z][a-z0-9]{0,11}$"}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "vm_size": {"key": "vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, + "os_disk_type": {"key": "osDiskType", "type": "str"}, + "kubelet_disk_type": {"key": "kubeletDiskType", "type": "str"}, + "workload_runtime": {"key": "workloadRuntime", "type": "str"}, + "vnet_subnet_id": {"key": "vnetSubnetID", "type": "str"}, + "pod_subnet_id": {"key": "podSubnetID", "type": "str"}, + "max_pods": {"key": "maxPods", "type": "int"}, + "os_type": {"key": "osType", "type": "str"}, + "os_sku": {"key": "osSKU", "type": "str"}, + "max_count": {"key": "maxCount", "type": "int"}, + "min_count": {"key": "minCount", "type": "int"}, + "enable_auto_scaling": {"key": "enableAutoScaling", "type": "bool"}, + "scale_down_mode": {"key": "scaleDownMode", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, + "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, + "current_orchestrator_version": {"key": "currentOrchestratorVersion", "type": "str"}, + "node_image_version": {"key": "nodeImageVersion", "type": "str"}, + "upgrade_settings": {"key": "upgradeSettings", "type": "AgentPoolUpgradeSettings"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "power_state": {"key": "powerState", "type": "PowerState"}, + "availability_zones": {"key": "availabilityZones", "type": "[str]"}, + "enable_node_public_ip": {"key": "enableNodePublicIP", "type": "bool"}, + "node_public_ip_prefix_id": {"key": "nodePublicIPPrefixID", "type": "str"}, + "scale_set_priority": {"key": "scaleSetPriority", "type": "str"}, + "scale_set_eviction_policy": {"key": "scaleSetEvictionPolicy", "type": "str"}, + "spot_max_price": {"key": "spotMaxPrice", "type": "float"}, + "tags": {"key": "tags", "type": "{str}"}, + "node_labels": {"key": "nodeLabels", "type": "{str}"}, + "node_taints": {"key": "nodeTaints", "type": "[str]"}, + "proximity_placement_group_id": {"key": "proximityPlacementGroupID", "type": "str"}, + "kubelet_config": {"key": "kubeletConfig", "type": "KubeletConfig"}, + "linux_os_config": {"key": "linuxOSConfig", "type": "LinuxOSConfig"}, + "enable_encryption_at_host": {"key": "enableEncryptionAtHost", "type": "bool"}, + "enable_ultra_ssd": {"key": "enableUltraSSD", "type": "bool"}, + "enable_fips": {"key": "enableFIPS", "type": "bool"}, + "gpu_instance_profile": {"key": "gpuInstanceProfile", "type": "str"}, + "creation_data": {"key": "creationData", "type": "CreationData"}, + "host_group_id": {"key": "hostGroupID", "type": "str"}, + "name": {"key": "name", "type": "str"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Union[str, "_models.OSType"] = "Linux", + os_sku: Optional[Union[str, "_models.OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "_models.ScaleDownMode"]] = None, + type: Optional[Union[str, "_models.AgentPoolType"]] = None, + mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + power_state: Optional["_models.PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", + scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", + spot_max_price: float = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["_models.KubeletConfig"] = None, + linux_os_config: Optional["_models.LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, + creation_data: Optional["_models.CreationData"] = None, + host_group_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :paramtype count: int + :keyword vm_size: VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :paramtype vm_size: str + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :paramtype os_disk_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSDiskType + :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime + data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :paramtype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.KubeletDiskType + :keyword workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer" and "WasmWasi". + :paramtype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_01.models.WorkloadRuntime + :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and + used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to + just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype vnet_subnet_id: str + :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype pod_subnet_id: str + :keyword max_pods: The maximum number of pods that can run on a node. + :paramtype max_pods: int + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :keyword os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType + is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and + "Windows2022". + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSSKU + :keyword max_count: The maximum number of nodes for auto-scaling. + :paramtype max_count: int + :keyword min_count: The minimum number of nodes for auto-scaling. + :paramtype min_count: int + :keyword enable_auto_scaling: Whether to enable auto-scaler. + :paramtype enable_auto_scaling: bool + :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, + it defaults to Delete. Known values are: "Delete" and "Deallocate". + :paramtype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleDownMode + :keyword type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :paramtype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolType + :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For + additional information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :paramtype mode: str or ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolMode + :keyword orchestrator_version: Both patch version (e.g. 1.20.13) and + (e.g. 1.20) are supported. When is specified, the latest supported + GA patch version is chosen automatically. Updating the cluster with the same once + it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch + version is available. As a best practice, you should upgrade all node pools in an AKS cluster + to the same Kubernetes version. The node pool version must have the same major version as the + control plane. The node pool minor version must be within two minor versions of the control + plane version. The node pool version cannot be greater than the control plane version. For more + information see `upgrading a node pool + `_. + :paramtype orchestrator_version: str + :keyword upgrade_settings: Settings for upgrading the agentpool. + :paramtype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeSettings + :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent + Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs + and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :paramtype power_state: ~azure.mgmt.containerservice.v2023_01_01.models.PowerState + :keyword availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :paramtype availability_zones: list[str] + :keyword enable_node_public_ip: Some scenarios may require nodes in a node pool to receive + their own dedicated public IP addresses. A common scenario is for gaming workloads, where a + console needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :paramtype enable_node_public_ip: bool + :keyword node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :paramtype node_public_ip_prefix_id: str + :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Known values are: "Spot" and "Regular". + :paramtype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetPriority + :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :paramtype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ScaleSetEvictionPolicy + :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :paramtype spot_max_price: float + :keyword tags: The tags to be persisted on the agent pool virtual machine scale set. + :paramtype tags: dict[str, str] + :keyword node_labels: The node labels to be persisted across all nodes in agent pool. + :paramtype node_labels: dict[str, str] + :keyword node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :paramtype node_taints: list[str] + :keyword proximity_placement_group_id: The ID for Proximity Placement Group. + :paramtype proximity_placement_group_id: str + :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. + :paramtype kubelet_config: ~azure.mgmt.containerservice.v2023_01_01.models.KubeletConfig + :keyword linux_os_config: The OS configuration of Linux agent nodes. + :paramtype linux_os_config: ~azure.mgmt.containerservice.v2023_01_01.models.LinuxOSConfig + :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :paramtype enable_encryption_at_host: bool + :keyword enable_ultra_ssd: Whether to enable UltraSSD. + :paramtype enable_ultra_ssd: bool + :keyword enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :paramtype enable_fips: bool + :keyword gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance + profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and + "MIG7g". + :paramtype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_01.models.GPUInstanceProfile + :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :keyword host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :paramtype host_group_id: str + :keyword name: Windows agent pool names must be 6 characters or less. Required. + :paramtype name: str + """ + super().__init__( + count=count, + vm_size=vm_size, + os_disk_size_gb=os_disk_size_gb, + os_disk_type=os_disk_type, + kubelet_disk_type=kubelet_disk_type, + workload_runtime=workload_runtime, + vnet_subnet_id=vnet_subnet_id, + pod_subnet_id=pod_subnet_id, + max_pods=max_pods, + os_type=os_type, + os_sku=os_sku, + max_count=max_count, + min_count=min_count, + enable_auto_scaling=enable_auto_scaling, + scale_down_mode=scale_down_mode, + type=type, + mode=mode, + orchestrator_version=orchestrator_version, + upgrade_settings=upgrade_settings, + power_state=power_state, + availability_zones=availability_zones, + enable_node_public_ip=enable_node_public_ip, + node_public_ip_prefix_id=node_public_ip_prefix_id, + scale_set_priority=scale_set_priority, + scale_set_eviction_policy=scale_set_eviction_policy, + spot_max_price=spot_max_price, + tags=tags, + node_labels=node_labels, + node_taints=node_taints, + proximity_placement_group_id=proximity_placement_group_id, + kubelet_config=kubelet_config, + linux_os_config=linux_os_config, + enable_encryption_at_host=enable_encryption_at_host, + enable_ultra_ssd=enable_ultra_ssd, + enable_fips=enable_fips, + gpu_instance_profile=gpu_instance_profile, + creation_data=creation_data, + host_group_id=host_group_id, + **kwargs + ) + self.name = name + + +class ManagedClusterAPIServerAccessProfile(_serialization.Model): + """Access profile for managed cluster API server. + + :ivar authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + This feature is not compatible with clusters that use Public IP Per Node, or clusters that are + using a Basic Load Balancer. For more information see `API server authorized IP ranges + `_. + :vartype authorized_ip_ranges: list[str] + :ivar enable_private_cluster: For more details, see `Creating a private AKS cluster + `_. + :vartype enable_private_cluster: bool + :ivar private_dns_zone: The default is System. For more details see `configure private DNS zone + `_. Allowed + values are 'system' and 'none'. + :vartype private_dns_zone: str + :ivar enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. + :vartype enable_private_cluster_public_fqdn: bool + :ivar disable_run_command: Whether to disable run command for the cluster or not. + :vartype disable_run_command: bool + """ + + _attribute_map = { + "authorized_ip_ranges": {"key": "authorizedIPRanges", "type": "[str]"}, + "enable_private_cluster": {"key": "enablePrivateCluster", "type": "bool"}, + "private_dns_zone": {"key": "privateDNSZone", "type": "str"}, + "enable_private_cluster_public_fqdn": {"key": "enablePrivateClusterPublicFQDN", "type": "bool"}, + "disable_run_command": {"key": "disableRunCommand", "type": "bool"}, + } + + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + enable_private_cluster_public_fqdn: Optional[bool] = None, + disable_run_command: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + This feature is not compatible with clusters that use Public IP Per Node, or clusters that are + using a Basic Load Balancer. For more information see `API server authorized IP ranges + `_. + :paramtype authorized_ip_ranges: list[str] + :keyword enable_private_cluster: For more details, see `Creating a private AKS cluster + `_. + :paramtype enable_private_cluster: bool + :keyword private_dns_zone: The default is System. For more details see `configure private DNS + zone `_. + Allowed values are 'system' and 'none'. + :paramtype private_dns_zone: str + :keyword enable_private_cluster_public_fqdn: Whether to create additional public FQDN for + private cluster or not. + :paramtype enable_private_cluster_public_fqdn: bool + :keyword disable_run_command: Whether to disable run command for the cluster or not. + :paramtype disable_run_command: bool + """ + super().__init__(**kwargs) + self.authorized_ip_ranges = authorized_ip_ranges + self.enable_private_cluster = enable_private_cluster + self.private_dns_zone = private_dns_zone + self.enable_private_cluster_public_fqdn = enable_private_cluster_public_fqdn + self.disable_run_command = disable_run_command + + +class ManagedClusterAutoUpgradeProfile(_serialization.Model): + """Auto upgrade profile for a managed cluster. + + :ivar upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel + `_. Known values + are: "rapid", "stable", "patch", "node-image", and "none". + :vartype upgrade_channel: str or ~azure.mgmt.containerservice.v2023_01_01.models.UpgradeChannel + """ + + _attribute_map = { + "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, + } + + def __init__( + self, *, upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, **kwargs: Any + ) -> None: + """ + :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade + channel `_. + Known values are: "rapid", "stable", "patch", "node-image", and "none". + :paramtype upgrade_channel: str or + ~azure.mgmt.containerservice.v2023_01_01.models.UpgradeChannel + """ + super().__init__(**kwargs) + self.upgrade_channel = upgrade_channel + + +class ManagedClusterAzureMonitorProfile(_serialization.Model): + """Azure Monitor addon profiles for monitoring the managed cluster. + + :ivar metrics: Metrics profile for the Azure Monitor managed service for Prometheus addon. + Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace + and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an + overview. + :vartype metrics: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAzureMonitorProfileMetrics + """ + + _attribute_map = { + "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, + } + + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: + """ + :keyword metrics: Metrics profile for the Azure Monitor managed service for Prometheus addon. + Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace + and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an + overview. + :paramtype metrics: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAzureMonitorProfileMetrics + """ + super().__init__(**kwargs) + self.metrics = metrics + + +class ManagedClusterAzureMonitorProfileKubeStateMetrics(_serialization.Model): + """Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are + for the kube-state-metrics pod that is deployed with the addon. See + aka.ms/AzureManagedPrometheus-optional-parameters for details. + + :ivar metric_labels_allowlist: Comma-separated list of additional Kubernetes label keys that + will be used in the resource's labels metric (Example: + 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only + resource name and namespace labels. + :vartype metric_labels_allowlist: str + :ivar metric_annotations_allow_list: Comma-separated list of Kubernetes annotation keys that + will be used in the resource's labels metric (Example: + 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric + contains only resource name and namespace labels. + :vartype metric_annotations_allow_list: str + """ + + _attribute_map = { + "metric_labels_allowlist": {"key": "metricLabelsAllowlist", "type": "str"}, + "metric_annotations_allow_list": {"key": "metricAnnotationsAllowList", "type": "str"}, + } + + def __init__( + self, + *, + metric_labels_allowlist: Optional[str] = None, + metric_annotations_allow_list: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword metric_labels_allowlist: Comma-separated list of additional Kubernetes label keys that + will be used in the resource's labels metric (Example: + 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only + resource name and namespace labels. + :paramtype metric_labels_allowlist: str + :keyword metric_annotations_allow_list: Comma-separated list of Kubernetes annotation keys that + will be used in the resource's labels metric (Example: + 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric + contains only resource name and namespace labels. + :paramtype metric_annotations_allow_list: str + """ + super().__init__(**kwargs) + self.metric_labels_allowlist = metric_labels_allowlist + self.metric_annotations_allow_list = metric_annotations_allow_list + + +class ManagedClusterAzureMonitorProfileMetrics(_serialization.Model): + """Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and + configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an + overview. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + Required. + :vartype enabled: bool + :ivar kube_state_metrics: Kube State Metrics profile for the Azure Managed Prometheus addon. + These optional settings are for the kube-state-metrics pod that is deployed with the addon. See + aka.ms/AzureManagedPrometheus-optional-parameters for details. + :vartype kube_state_metrics: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAzureMonitorProfileKubeStateMetrics + """ + + _validation = { + "enabled": {"required": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "kube_state_metrics": {"key": "kubeStateMetrics", "type": "ManagedClusterAzureMonitorProfileKubeStateMetrics"}, + } + + def __init__( + self, + *, + enabled: bool, + kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether to enable or disable the Azure Managed Prometheus addon for + Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and + disabling. Required. + :paramtype enabled: bool + :keyword kube_state_metrics: Kube State Metrics profile for the Azure Managed Prometheus addon. + These optional settings are for the kube-state-metrics pod that is deployed with the addon. See + aka.ms/AzureManagedPrometheus-optional-parameters for details. + :paramtype kube_state_metrics: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAzureMonitorProfileKubeStateMetrics + """ + super().__init__(**kwargs) + self.enabled = enabled + self.kube_state_metrics = kube_state_metrics + + +class ManagedClusterHTTPProxyConfig(_serialization.Model): + """Cluster HTTP proxy configuration. + + :ivar http_proxy: The HTTP proxy server endpoint to use. + :vartype http_proxy: str + :ivar https_proxy: The HTTPS proxy server endpoint to use. + :vartype https_proxy: str + :ivar no_proxy: The endpoints that should not go through proxy. + :vartype no_proxy: list[str] + :ivar trusted_ca: Alternative CA cert to use for connecting to proxy servers. + :vartype trusted_ca: str + """ + + _attribute_map = { + "http_proxy": {"key": "httpProxy", "type": "str"}, + "https_proxy": {"key": "httpsProxy", "type": "str"}, + "no_proxy": {"key": "noProxy", "type": "[str]"}, + "trusted_ca": {"key": "trustedCa", "type": "str"}, + } + + def __init__( + self, + *, + http_proxy: Optional[str] = None, + https_proxy: Optional[str] = None, + no_proxy: Optional[List[str]] = None, + trusted_ca: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword http_proxy: The HTTP proxy server endpoint to use. + :paramtype http_proxy: str + :keyword https_proxy: The HTTPS proxy server endpoint to use. + :paramtype https_proxy: str + :keyword no_proxy: The endpoints that should not go through proxy. + :paramtype no_proxy: list[str] + :keyword trusted_ca: Alternative CA cert to use for connecting to proxy servers. + :paramtype trusted_ca: str + """ + super().__init__(**kwargs) + self.http_proxy = http_proxy + self.https_proxy = https_proxy + self.no_proxy = no_proxy + self.trusted_ca = trusted_ca + + +class ManagedClusterIdentity(_serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :ivar type: For more information see `use managed identities in AKS + `_. Known values are: + "SystemAssigned", "UserAssigned", and "None". + :vartype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.ResourceIdentityType + :ivar user_assigned_identities: The keys must be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": { + "key": "userAssignedIdentities", + "type": "{ManagedServiceIdentityUserAssignedIdentitiesValue}", + }, + } + + def __init__( + self, + *, + type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, + user_assigned_identities: Optional[ + Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] + ] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: For more information see `use managed identities in AKS + `_. Known values are: + "SystemAssigned", "UserAssigned", and "None". + :paramtype type: str or ~azure.mgmt.containerservice.v2023_01_01.models.ResourceIdentityType + :keyword user_assigned_identities: The keys must be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :paramtype user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + super().__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ManagedClusterListResult(_serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of managed clusters. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[ManagedCluster]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of managed clusters. + :paramtype value: list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class ManagedClusterLoadBalancerProfile(_serialization.Model): + """Profile of the managed cluster load balancer. + + :ivar managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :vartype managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :ivar outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load balancer. + :vartype outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :ivar outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :vartype outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPs + :ivar effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :vartype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + :ivar allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed + values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in + Azure dynamically allocating ports. + :vartype allocated_outbound_ports: int + :ivar idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :vartype idle_timeout_in_minutes: int + :ivar enable_multiple_standard_load_balancers: Enable multiple standard load balancers per AKS + cluster or not. + :vartype enable_multiple_standard_load_balancers: bool + """ + + _validation = { + "allocated_outbound_ports": {"maximum": 64000, "minimum": 0}, + "idle_timeout_in_minutes": {"maximum": 120, "minimum": 4}, + } + + _attribute_map = { + "managed_outbound_i_ps": { + "key": "managedOutboundIPs", + "type": "ManagedClusterLoadBalancerProfileManagedOutboundIPs", + }, + "outbound_ip_prefixes": { + "key": "outboundIPPrefixes", + "type": "ManagedClusterLoadBalancerProfileOutboundIPPrefixes", + }, + "outbound_i_ps": {"key": "outboundIPs", "type": "ManagedClusterLoadBalancerProfileOutboundIPs"}, + "effective_outbound_i_ps": {"key": "effectiveOutboundIPs", "type": "[ResourceReference]"}, + "allocated_outbound_ports": {"key": "allocatedOutboundPorts", "type": "int"}, + "idle_timeout_in_minutes": {"key": "idleTimeoutInMinutes", "type": "int"}, + "enable_multiple_standard_load_balancers": {"key": "enableMultipleStandardLoadBalancers", "type": "bool"}, + } + + def __init__( + self, + *, + managed_outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, + allocated_outbound_ports: int = 0, + idle_timeout_in_minutes: int = 30, + enable_multiple_standard_load_balancers: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :paramtype managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :keyword outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. + :paramtype outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :keyword outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :paramtype outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPs + :keyword effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :paramtype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + :keyword allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed + values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in + Azure dynamically allocating ports. + :paramtype allocated_outbound_ports: int + :keyword idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :paramtype idle_timeout_in_minutes: int + :keyword enable_multiple_standard_load_balancers: Enable multiple standard load balancers per + AKS cluster or not. + :paramtype enable_multiple_standard_load_balancers: bool + """ + super().__init__(**kwargs) + self.managed_outbound_i_ps = managed_outbound_i_ps + self.outbound_ip_prefixes = outbound_ip_prefixes + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps + self.allocated_outbound_ports = allocated_outbound_ports + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_multiple_standard_load_balancers = enable_multiple_standard_load_balancers + + +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): + """Desired managed outbound IPs for the cluster load balancer. + + :ivar count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster + load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value + is 1. + :vartype count: int + :ivar count_ipv6: The desired number of IPv6 outbound IPs created/managed by Azure for the + cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 0 for single-stack and 1 for dual-stack. + :vartype count_ipv6: int + """ + + _validation = { + "count": {"maximum": 100, "minimum": 1}, + "count_ipv6": {"maximum": 100, "minimum": 0}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "count_ipv6": {"key": "countIPv6", "type": "int"}, + } + + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: + """ + :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the + cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 1. + :paramtype count: int + :keyword count_ipv6: The desired number of IPv6 outbound IPs created/managed by Azure for the + cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 0 for single-stack and 1 for dual-stack. + :paramtype count_ipv6: int + """ + super().__init__(**kwargs) + self.count = count + self.count_ipv6 = count_ipv6 + + +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): + """Desired outbound IP Prefix resources for the cluster load balancer. + + :ivar public_ip_prefixes: A list of public IP prefix resources. + :vartype public_ip_prefixes: + list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + """ + + _attribute_map = { + "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, + } + + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: + """ + :keyword public_ip_prefixes: A list of public IP prefix resources. + :paramtype public_ip_prefixes: + list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + """ + super().__init__(**kwargs) + self.public_ip_prefixes = public_ip_prefixes + + +class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): + """Desired outbound IP resources for the cluster load balancer. + + :ivar public_i_ps: A list of public IP resources. + :vartype public_i_ps: list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + """ + + _attribute_map = { + "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, + } + + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: + """ + :keyword public_i_ps: A list of public IP resources. + :paramtype public_i_ps: list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + """ + super().__init__(**kwargs) + self.public_i_ps = public_i_ps + + +class ManagedClusterManagedOutboundIPProfile(_serialization.Model): + """Profile of the managed outbound IP resources of the managed cluster. + + :ivar count: The desired number of outbound IPs created/managed by Azure. Allowed values must + be in the range of 1 to 16 (inclusive). The default value is 1. + :vartype count: int + """ + + _validation = { + "count": {"maximum": 16, "minimum": 1}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + } + + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: + """ + :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values + must be in the range of 1 to 16 (inclusive). The default value is 1. + :paramtype count: int + """ + super().__init__(**kwargs) + self.count = count + + +class ManagedClusterNATGatewayProfile(_serialization.Model): + """Profile of the managed cluster NAT gateway. + + :ivar managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster + NAT gateway. + :vartype managed_outbound_ip_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterManagedOutboundIPProfile + :ivar effective_outbound_i_ps: The effective outbound IP resources of the cluster NAT gateway. + :vartype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + :ivar idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 4 minutes. + :vartype idle_timeout_in_minutes: int + """ + + _validation = { + "idle_timeout_in_minutes": {"maximum": 120, "minimum": 4}, + } + + _attribute_map = { + "managed_outbound_ip_profile": { + "key": "managedOutboundIPProfile", + "type": "ManagedClusterManagedOutboundIPProfile", + }, + "effective_outbound_i_ps": {"key": "effectiveOutboundIPs", "type": "[ResourceReference]"}, + "idle_timeout_in_minutes": {"key": "idleTimeoutInMinutes", "type": "int"}, + } + + def __init__( + self, + *, + managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, + effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, + idle_timeout_in_minutes: int = 4, + **kwargs: Any + ) -> None: + """ + :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the + cluster NAT gateway. + :paramtype managed_outbound_ip_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterManagedOutboundIPProfile + :keyword effective_outbound_i_ps: The effective outbound IP resources of the cluster NAT + gateway. + :paramtype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_01.models.ResourceReference] + :keyword idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 4 minutes. + :paramtype idle_timeout_in_minutes: int + """ + super().__init__(**kwargs) + self.managed_outbound_ip_profile = managed_outbound_ip_profile + self.effective_outbound_i_ps = effective_outbound_i_ps + self.idle_timeout_in_minutes = idle_timeout_in_minutes + + +class ManagedClusterOIDCIssuerProfile(_serialization.Model): + """The OIDC issuer profile of the Managed Cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar issuer_url: The OIDC issuer url of the Managed Cluster. + :vartype issuer_url: str + :ivar enabled: Whether the OIDC issuer is enabled. + :vartype enabled: bool + """ + + _validation = { + "issuer_url": {"readonly": True}, + } + + _attribute_map = { + "issuer_url": {"key": "issuerURL", "type": "str"}, + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether the OIDC issuer is enabled. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.issuer_url = None + self.enabled = enabled + + +class ManagedClusterPodIdentity(_serialization.Model): + """Details about the pod identity assigned to the Managed Cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The name of the pod identity. Required. + :vartype name: str + :ivar namespace: The namespace of the pod identity. Required. + :vartype namespace: str + :ivar binding_selector: The binding selector to use for the AzureIdentityBinding resource. + :vartype binding_selector: str + :ivar identity: The user assigned identity details. Required. + :vartype identity: ~azure.mgmt.containerservice.v2023_01_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Known values are: + "Assigned", "Canceled", "Deleting", "Failed", "Succeeded", and "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningState + :ivar provisioning_info: + :vartype provisioning_info: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningInfo + """ + + _validation = { + "name": {"required": True}, + "namespace": {"required": True}, + "identity": {"required": True}, + "provisioning_state": {"readonly": True}, + "provisioning_info": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "binding_selector": {"key": "bindingSelector", "type": "str"}, + "identity": {"key": "identity", "type": "UserAssignedIdentity"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "provisioning_info": {"key": "provisioningInfo", "type": "ManagedClusterPodIdentityProvisioningInfo"}, + } + + def __init__( + self, + *, + name: str, + namespace: str, + identity: "_models.UserAssignedIdentity", + binding_selector: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the pod identity. Required. + :paramtype name: str + :keyword namespace: The namespace of the pod identity. Required. + :paramtype namespace: str + :keyword binding_selector: The binding selector to use for the AzureIdentityBinding resource. + :paramtype binding_selector: str + :keyword identity: The user assigned identity details. Required. + :paramtype identity: ~azure.mgmt.containerservice.v2023_01_01.models.UserAssignedIdentity + """ + super().__init__(**kwargs) + self.name = name + self.namespace = namespace + self.binding_selector = binding_selector + self.identity = identity + self.provisioning_state = None + self.provisioning_info = None + + +class ManagedClusterPodIdentityException(_serialization.Model): + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The name of the pod identity exception. Required. + :vartype name: str + :ivar namespace: The namespace of the pod identity exception. Required. + :vartype namespace: str + :ivar pod_labels: The pod labels to match. Required. + :vartype pod_labels: dict[str, str] + """ + + _validation = { + "name": {"required": True}, + "namespace": {"required": True}, + "pod_labels": {"required": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "pod_labels": {"key": "podLabels", "type": "{str}"}, + } + + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: + """ + :keyword name: The name of the pod identity exception. Required. + :paramtype name: str + :keyword namespace: The namespace of the pod identity exception. Required. + :paramtype namespace: str + :keyword pod_labels: The pod labels to match. Required. + :paramtype pod_labels: dict[str, str] + """ + super().__init__(**kwargs) + self.name = name + self.namespace = namespace + self.pod_labels = pod_labels + + +class ManagedClusterPodIdentityProfile(_serialization.Model): + """See `use AAD pod identity `_ + for more details on pod identity integration. + + :ivar enabled: Whether the pod identity addon is enabled. + :vartype enabled: bool + :ivar allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the + security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet + network plugin with AAD Pod Identity + `_ + for more information. + :vartype allow_network_plugin_kubenet: bool + :ivar user_assigned_identities: The pod identities to use in the cluster. + :vartype user_assigned_identities: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentity] + :ivar user_assigned_identity_exceptions: The pod identity exceptions to allow. + :vartype user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityException] + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "allow_network_plugin_kubenet": {"key": "allowNetworkPluginKubenet", "type": "bool"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "[ManagedClusterPodIdentity]"}, + "user_assigned_identity_exceptions": { + "key": "userAssignedIdentityExceptions", + "type": "[ManagedClusterPodIdentityException]", + }, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + allow_network_plugin_kubenet: Optional[bool] = None, + user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether the pod identity addon is enabled. + :paramtype enabled: bool + :keyword allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the + security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet + network plugin with AAD Pod Identity + `_ + for more information. + :paramtype allow_network_plugin_kubenet: bool + :keyword user_assigned_identities: The pod identities to use in the cluster. + :paramtype user_assigned_identities: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentity] + :keyword user_assigned_identity_exceptions: The pod identity exceptions to allow. + :paramtype user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityException] + """ + super().__init__(**kwargs) + self.enabled = enabled + self.allow_network_plugin_kubenet = allow_network_plugin_kubenet + self.user_assigned_identities = user_assigned_identities + self.user_assigned_identity_exceptions = user_assigned_identity_exceptions + + +class ManagedClusterPodIdentityProvisioningError(_serialization.Model): + """An error response from the pod identity provisioning. + + :ivar error: Details about the error. + :vartype error: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningErrorBody + """ + + _attribute_map = { + "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, + } + + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: + """ + :keyword error: Details about the error. + :paramtype error: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningErrorBody + """ + super().__init__(**kwargs) + self.error = error + + +class ManagedClusterPodIdentityProvisioningErrorBody(_serialization.Model): + """An error response from the pod identity provisioning. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of the property in + error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningErrorBody] + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ManagedClusterPodIdentityProvisioningErrorBody]"}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :paramtype code: str + :keyword message: A message describing the error, intended to be suitable for display in a user + interface. + :paramtype message: str + :keyword target: The target of the particular error. For example, the name of the property in + error. + :paramtype target: str + :keyword details: A list of additional details about the error. + :paramtype details: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningErrorBody] + """ + super().__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): + """ManagedClusterPodIdentityProvisioningInfo. + + :ivar error: Pod identity assignment error (if any). + :vartype error: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningError + """ + + _attribute_map = { + "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, + } + + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: + """ + :keyword error: Pod identity assignment error (if any). + :paramtype error: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPodIdentityProvisioningError + """ + super().__init__(**kwargs) + self.error = error + + +class ManagedClusterPoolUpgradeProfile(_serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :vartype kubernetes_version: str + :ivar name: The Agent Pool name. + :vartype name: str + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :ivar upgrades: List of orchestrator types and versions available for upgrade. + :vartype upgrades: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + "kubernetes_version": {"required": True}, + "os_type": {"required": True}, + } + + _attribute_map = { + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "os_type": {"key": "osType", "type": "str"}, + "upgrades": {"key": "upgrades", "type": "[ManagedClusterPoolUpgradeProfileUpgradesItem]"}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "_models.OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :paramtype kubernetes_version: str + :keyword name: The Agent Pool name. + :paramtype name: str + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :keyword upgrades: List of orchestrator types and versions available for upgrade. + :paramtype upgrades: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + super().__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.name = name + self.os_type = os_type + self.upgrades = upgrades + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). + :vartype kubernetes_version: str + :ivar is_preview: Whether the Kubernetes version is currently in preview. + :vartype is_preview: bool + """ + + _attribute_map = { + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "is_preview": {"key": "isPreview", "type": "bool"}, + } + + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). + :paramtype kubernetes_version: str + :keyword is_preview: Whether the Kubernetes version is currently in preview. + :paramtype is_preview: bool + """ + super().__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class ManagedClusterPropertiesAutoScalerProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Parameters to be applied to the cluster-autoscaler when enabled. + + :ivar balance_similar_node_groups: Valid values are 'true' and 'false'. + :vartype balance_similar_node_groups: str + :ivar expander: If not specified, the default is 'random'. See `expanders + `_ + for more information. Known values are: "least-waste", "most-pods", "priority", and "random". + :vartype expander: str or ~azure.mgmt.containerservice.v2023_01_01.models.Expander + :ivar max_empty_bulk_delete: The default is 10. + :vartype max_empty_bulk_delete: str + :ivar max_graceful_termination_sec: The default is 600. + :vartype max_graceful_termination_sec: str + :ivar max_node_provision_time: The default is '15m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :vartype max_node_provision_time: str + :ivar max_total_unready_percentage: The default is 45. The maximum is 100 and the minimum is 0. + :vartype max_total_unready_percentage: str + :ivar new_pod_scale_up_delay: For scenarios like burst/batch scale where you don't want CA to + act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore + unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer + followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + :vartype new_pod_scale_up_delay: str + :ivar ok_total_unready_count: This must be an integer. The default is 3. + :vartype ok_total_unready_count: str + :ivar scan_interval: The default is '10'. Values must be an integer number of seconds. + :vartype scan_interval: str + :ivar scale_down_delay_after_add: The default is '10m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_delay_after_add: str + :ivar scale_down_delay_after_delete: The default is the scan-interval. Values must be an + integer followed by an 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_delay_after_delete: str + :ivar scale_down_delay_after_failure: The default is '3m'. Values must be an integer followed + by an 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_delay_after_failure: str + :ivar scale_down_unneeded_time: The default is '10m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_unneeded_time: str + :ivar scale_down_unready_time: The default is '20m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_unready_time: str + :ivar scale_down_utilization_threshold: The default is '0.5'. + :vartype scale_down_utilization_threshold: str + :ivar skip_nodes_with_local_storage: The default is true. + :vartype skip_nodes_with_local_storage: str + :ivar skip_nodes_with_system_pods: The default is true. + :vartype skip_nodes_with_system_pods: str + """ + + _attribute_map = { + "balance_similar_node_groups": {"key": "balance-similar-node-groups", "type": "str"}, + "expander": {"key": "expander", "type": "str"}, + "max_empty_bulk_delete": {"key": "max-empty-bulk-delete", "type": "str"}, + "max_graceful_termination_sec": {"key": "max-graceful-termination-sec", "type": "str"}, + "max_node_provision_time": {"key": "max-node-provision-time", "type": "str"}, + "max_total_unready_percentage": {"key": "max-total-unready-percentage", "type": "str"}, + "new_pod_scale_up_delay": {"key": "new-pod-scale-up-delay", "type": "str"}, + "ok_total_unready_count": {"key": "ok-total-unready-count", "type": "str"}, + "scan_interval": {"key": "scan-interval", "type": "str"}, + "scale_down_delay_after_add": {"key": "scale-down-delay-after-add", "type": "str"}, + "scale_down_delay_after_delete": {"key": "scale-down-delay-after-delete", "type": "str"}, + "scale_down_delay_after_failure": {"key": "scale-down-delay-after-failure", "type": "str"}, + "scale_down_unneeded_time": {"key": "scale-down-unneeded-time", "type": "str"}, + "scale_down_unready_time": {"key": "scale-down-unready-time", "type": "str"}, + "scale_down_utilization_threshold": {"key": "scale-down-utilization-threshold", "type": "str"}, + "skip_nodes_with_local_storage": {"key": "skip-nodes-with-local-storage", "type": "str"}, + "skip_nodes_with_system_pods": {"key": "skip-nodes-with-system-pods", "type": "str"}, + } + + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "_models.Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provision_time: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. + :paramtype balance_similar_node_groups: str + :keyword expander: If not specified, the default is 'random'. See `expanders + `_ + for more information. Known values are: "least-waste", "most-pods", "priority", and "random". + :paramtype expander: str or ~azure.mgmt.containerservice.v2023_01_01.models.Expander + :keyword max_empty_bulk_delete: The default is 10. + :paramtype max_empty_bulk_delete: str + :keyword max_graceful_termination_sec: The default is 600. + :paramtype max_graceful_termination_sec: str + :keyword max_node_provision_time: The default is '15m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :paramtype max_node_provision_time: str + :keyword max_total_unready_percentage: The default is 45. The maximum is 100 and the minimum is + 0. + :paramtype max_total_unready_percentage: str + :keyword new_pod_scale_up_delay: For scenarios like burst/batch scale where you don't want CA + to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore + unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer + followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + :paramtype new_pod_scale_up_delay: str + :keyword ok_total_unready_count: This must be an integer. The default is 3. + :paramtype ok_total_unready_count: str + :keyword scan_interval: The default is '10'. Values must be an integer number of seconds. + :paramtype scan_interval: str + :keyword scale_down_delay_after_add: The default is '10m'. Values must be an integer followed + by an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_delay_after_add: str + :keyword scale_down_delay_after_delete: The default is the scan-interval. Values must be an + integer followed by an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_delay_after_delete: str + :keyword scale_down_delay_after_failure: The default is '3m'. Values must be an integer + followed by an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_delay_after_failure: str + :keyword scale_down_unneeded_time: The default is '10m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_unneeded_time: str + :keyword scale_down_unready_time: The default is '20m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_unready_time: str + :keyword scale_down_utilization_threshold: The default is '0.5'. + :paramtype scale_down_utilization_threshold: str + :keyword skip_nodes_with_local_storage: The default is true. + :paramtype skip_nodes_with_local_storage: str + :keyword skip_nodes_with_system_pods: The default is true. + :paramtype skip_nodes_with_system_pods: str + """ + super().__init__(**kwargs) + self.balance_similar_node_groups = balance_similar_node_groups + self.expander = expander + self.max_empty_bulk_delete = max_empty_bulk_delete + self.max_graceful_termination_sec = max_graceful_termination_sec + self.max_node_provision_time = max_node_provision_time + self.max_total_unready_percentage = max_total_unready_percentage + self.new_pod_scale_up_delay = new_pod_scale_up_delay + self.ok_total_unready_count = ok_total_unready_count + self.scan_interval = scan_interval + self.scale_down_delay_after_add = scale_down_delay_after_add + self.scale_down_delay_after_delete = scale_down_delay_after_delete + self.scale_down_delay_after_failure = scale_down_delay_after_failure + self.scale_down_unneeded_time = scale_down_unneeded_time + self.scale_down_unready_time = scale_down_unready_time + self.scale_down_utilization_threshold = scale_down_utilization_threshold + self.skip_nodes_with_local_storage = skip_nodes_with_local_storage + self.skip_nodes_with_system_pods = skip_nodes_with_system_pods + + +class ManagedClusterSecurityProfile(_serialization.Model): + """Security profile for the container service cluster. + + :ivar defender: Microsoft Defender settings for the security profile. + :vartype defender: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSecurityProfileDefender + :ivar azure_key_vault_kms: Azure Key Vault `key management service + `_ settings for the security + profile. + :vartype azure_key_vault_kms: ~azure.mgmt.containerservice.v2023_01_01.models.AzureKeyVaultKms + """ + + _attribute_map = { + "defender": {"key": "defender", "type": "ManagedClusterSecurityProfileDefender"}, + "azure_key_vault_kms": {"key": "azureKeyVaultKms", "type": "AzureKeyVaultKms"}, + } + + def __init__( + self, + *, + defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, + azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, + **kwargs: Any + ) -> None: + """ + :keyword defender: Microsoft Defender settings for the security profile. + :paramtype defender: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSecurityProfileDefender + :keyword azure_key_vault_kms: Azure Key Vault `key management service + `_ settings for the security + profile. + :paramtype azure_key_vault_kms: + ~azure.mgmt.containerservice.v2023_01_01.models.AzureKeyVaultKms + """ + super().__init__(**kwargs) + self.defender = defender + self.azure_key_vault_kms = azure_key_vault_kms + + +class ManagedClusterSecurityProfileDefender(_serialization.Model): + """Microsoft Defender settings for the security profile. + + :ivar log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be + associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required + and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field + empty. + :vartype log_analytics_workspace_resource_id: str + :ivar security_monitoring: Microsoft Defender threat detection for Cloud settings for the + security profile. + :vartype security_monitoring: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring + """ + + _attribute_map = { + "log_analytics_workspace_resource_id": {"key": "logAnalyticsWorkspaceResourceId", "type": "str"}, + "security_monitoring": { + "key": "securityMonitoring", + "type": "ManagedClusterSecurityProfileDefenderSecurityMonitoring", + }, + } + + def __init__( + self, + *, + log_analytics_workspace_resource_id: Optional[str] = None, + security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, + **kwargs: Any + ) -> None: + """ + :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be + associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required + and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field + empty. + :paramtype log_analytics_workspace_resource_id: str + :keyword security_monitoring: Microsoft Defender threat detection for Cloud settings for the + security profile. + :paramtype security_monitoring: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring + """ + super().__init__(**kwargs) + self.log_analytics_workspace_resource_id = log_analytics_workspace_resource_id + self.security_monitoring = security_monitoring + + +class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Model): + """Microsoft Defender settings for the security profile threat detection. + + :ivar enabled: Whether to enable Defender threat detection. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable Defender threat detection. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterServicePrincipalProfile(_serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. + + All required parameters must be populated in order to send to Azure. + + :ivar client_id: The ID for the service principal. Required. + :vartype client_id: str + :ivar secret: The secret password associated with the service principal in plain text. + :vartype secret: str + """ + + _validation = { + "client_id": {"required": True}, + } + + _attribute_map = { + "client_id": {"key": "clientId", "type": "str"}, + "secret": {"key": "secret", "type": "str"}, + } + + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword client_id: The ID for the service principal. Required. + :paramtype client_id: str + :keyword secret: The secret password associated with the service principal in plain text. + :paramtype secret: str + """ + super().__init__(**kwargs) + self.client_id = client_id + self.secret = secret + + +class ManagedClusterSKU(_serialization.Model): + """The SKU of a Managed Cluster. + + :ivar name: The name of a managed cluster SKU. Known values are: "Basic" and "Base". + :vartype name: str or ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSKUName + :ivar tier: If not specified, the default is 'Free'. See `AKS Pricing Tier + `_ for more details. Known + values are: "Paid", "Standard", and "Free". + :vartype tier: str or ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSKUTier + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of a managed cluster SKU. Known values are: "Basic" and "Base". + :paramtype name: str or ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSKUName + :keyword tier: If not specified, the default is 'Free'. See `AKS Pricing Tier + `_ for more details. Known + values are: "Paid", "Standard", and "Free". + :paramtype tier: str or ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterSKUTier + """ + super().__init__(**kwargs) + self.name = name + self.tier = tier + + +class ManagedClusterStorageProfile(_serialization.Model): + """Storage profile for the container service cluster. + + :ivar disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. + :vartype disk_csi_driver: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileDiskCSIDriver + :ivar file_csi_driver: AzureFile CSI Driver settings for the storage profile. + :vartype file_csi_driver: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileFileCSIDriver + :ivar snapshot_controller: Snapshot Controller settings for the storage profile. + :vartype snapshot_controller: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileSnapshotController + :ivar blob_csi_driver: AzureBlob CSI Driver settings for the storage profile. + :vartype blob_csi_driver: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileBlobCSIDriver + """ + + _attribute_map = { + "disk_csi_driver": {"key": "diskCSIDriver", "type": "ManagedClusterStorageProfileDiskCSIDriver"}, + "file_csi_driver": {"key": "fileCSIDriver", "type": "ManagedClusterStorageProfileFileCSIDriver"}, + "snapshot_controller": {"key": "snapshotController", "type": "ManagedClusterStorageProfileSnapshotController"}, + "blob_csi_driver": {"key": "blobCSIDriver", "type": "ManagedClusterStorageProfileBlobCSIDriver"}, + } + + def __init__( + self, + *, + disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, + file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, + snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, + blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, + **kwargs: Any + ) -> None: + """ + :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. + :paramtype disk_csi_driver: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileDiskCSIDriver + :keyword file_csi_driver: AzureFile CSI Driver settings for the storage profile. + :paramtype file_csi_driver: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileFileCSIDriver + :keyword snapshot_controller: Snapshot Controller settings for the storage profile. + :paramtype snapshot_controller: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileSnapshotController + :keyword blob_csi_driver: AzureBlob CSI Driver settings for the storage profile. + :paramtype blob_csi_driver: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterStorageProfileBlobCSIDriver + """ + super().__init__(**kwargs) + self.disk_csi_driver = disk_csi_driver + self.file_csi_driver = file_csi_driver + self.snapshot_controller = snapshot_controller + self.blob_csi_driver = blob_csi_driver + + +class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): + """AzureBlob CSI Driver settings for the storage profile. + + :ivar enabled: Whether to enable AzureBlob CSI Driver. The default value is false. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): + """AzureDisk CSI Driver settings for the storage profile. + + :ivar enabled: Whether to enable AzureDisk CSI Driver. The default value is true. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): + """AzureFile CSI Driver settings for the storage profile. + + :ivar enabled: Whether to enable AzureFile CSI Driver. The default value is true. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterStorageProfileSnapshotController(_serialization.Model): + """Snapshot Controller settings for the storage profile. + + :ivar enabled: Whether to enable Snapshot Controller. The default value is true. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable Snapshot Controller. The default value is true. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterUpgradeProfile(_serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the upgrade profile. + :vartype id: str + :ivar name: The name of the upgrade profile. + :vartype name: str + :ivar type: The type of the upgrade profile. + :vartype type: str + :ivar control_plane_profile: The list of available upgrade versions for the control plane. + Required. + :vartype control_plane_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPoolUpgradeProfile + :ivar agent_pool_profiles: The list of available upgrade versions for agent pools. Required. + :vartype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "control_plane_profile": {"required": True}, + "agent_pool_profiles": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "control_plane_profile": {"key": "properties.controlPlaneProfile", "type": "ManagedClusterPoolUpgradeProfile"}, + "agent_pool_profiles": {"key": "properties.agentPoolProfiles", "type": "[ManagedClusterPoolUpgradeProfile]"}, + } + + def __init__( + self, + *, + control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], + **kwargs: Any + ) -> None: + """ + :keyword control_plane_profile: The list of available upgrade versions for the control plane. + Required. + :paramtype control_plane_profile: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPoolUpgradeProfile + :keyword agent_pool_profiles: The list of available upgrade versions for agent pools. Required. + :paramtype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterPoolUpgradeProfile] + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = control_plane_profile + self.agent_pool_profiles = agent_pool_profiles + + +class ManagedClusterWindowsProfile(_serialization.Model): + """Profile for Windows VMs in the managed cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` + **Restriction:** Cannot end in "." :code:`
`:code:`
` **Disallowed values:** + "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", + "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", + "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", + "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 character + :code:`
`:code:`
` **Max-length:** 20 characters. Required. + :vartype admin_username: str + :ivar admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :vartype admin_password: str + :ivar license_type: The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. Known values are: + "None" and "Windows_Server". + :vartype license_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.LicenseType + :ivar enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo + `_. + :vartype enable_csi_proxy: bool + :ivar gmsa_profile: The Windows gMSA Profile in the Managed Cluster. + :vartype gmsa_profile: ~azure.mgmt.containerservice.v2023_01_01.models.WindowsGmsaProfile + """ + + _validation = { + "admin_username": {"required": True}, + } + + _attribute_map = { + "admin_username": {"key": "adminUsername", "type": "str"}, + "admin_password": {"key": "adminPassword", "type": "str"}, + "license_type": {"key": "licenseType", "type": "str"}, + "enable_csi_proxy": {"key": "enableCSIProxy", "type": "bool"}, + "gmsa_profile": {"key": "gmsaProfile", "type": "WindowsGmsaProfile"}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "_models.LicenseType"]] = None, + enable_csi_proxy: Optional[bool] = None, + gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword admin_username: Specifies the name of the administrator account. + :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. Required. + :paramtype admin_username: str + :keyword admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :paramtype admin_password: str + :keyword license_type: The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. Known values are: + "None" and "Windows_Server". + :paramtype license_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.LicenseType + :keyword enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo + `_. + :paramtype enable_csi_proxy: bool + :keyword gmsa_profile: The Windows gMSA Profile in the Managed Cluster. + :paramtype gmsa_profile: ~azure.mgmt.containerservice.v2023_01_01.models.WindowsGmsaProfile + """ + super().__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + self.license_type = license_type + self.enable_csi_proxy = enable_csi_proxy + self.gmsa_profile = gmsa_profile + + +class ManagedClusterWorkloadAutoScalerProfile(_serialization.Model): + """Workload Auto-scaler profile for the managed cluster. + + :ivar keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler + profile. + :vartype keda: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterWorkloadAutoScalerProfileKeda + """ + + _attribute_map = { + "keda": {"key": "keda", "type": "ManagedClusterWorkloadAutoScalerProfileKeda"}, + } + + def __init__( + self, *, keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, **kwargs: Any + ) -> None: + """ + :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler + profile. + :paramtype keda: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterWorkloadAutoScalerProfileKeda + """ + super().__init__(**kwargs) + self.keda = keda + + +class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): + """KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether to enable KEDA. Required. + :vartype enabled: bool + """ + + _validation = { + "enabled": {"required": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable KEDA. Required. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + "principal_id": {"readonly": True}, + "client_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class OperationListResult(_serialization.Model): + """The List Operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of operations. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_01.models.OperationValue] + """ + + _validation = { + "value": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[OperationValue]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.value = None + + +class OperationValue(_serialization.Model): + """Describes the properties of a Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the operation. + :vartype origin: str + :ivar name: The name of the operation. + :vartype name: str + :ivar operation: The display name of the operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + "origin": {"readonly": True}, + "name": {"readonly": True}, + "operation": {"readonly": True}, + "resource": {"readonly": True}, + "description": {"readonly": True}, + "provider": {"readonly": True}, + } + + _attribute_map = { + "origin": {"key": "origin", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "operation": {"key": "display.operation", "type": "str"}, + "resource": {"key": "display.resource", "type": "str"}, + "description": {"key": "display.description", "type": "str"}, + "provider": {"key": "display.provider", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class OSOptionProfile(_serialization.Model): + """The OS option profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the OS option resource. + :vartype id: str + :ivar name: The name of the OS option resource. + :vartype name: str + :ivar type: The type of the OS option resource. + :vartype type: str + :ivar os_option_property_list: The list of OS options. Required. + :vartype os_option_property_list: + list[~azure.mgmt.containerservice.v2023_01_01.models.OSOptionProperty] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "os_option_property_list": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, + } + + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: + """ + :keyword os_option_property_list: The list of OS options. Required. + :paramtype os_option_property_list: + list[~azure.mgmt.containerservice.v2023_01_01.models.OSOptionProperty] + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.os_option_property_list = os_option_property_list + + +class OSOptionProperty(_serialization.Model): + """OS option property. + + All required parameters must be populated in order to send to Azure. + + :ivar os_type: The OS type. Required. + :vartype os_type: str + :ivar enable_fips_image: Whether the image is FIPS-enabled. Required. + :vartype enable_fips_image: bool + """ + + _validation = { + "os_type": {"required": True}, + "enable_fips_image": {"required": True}, + } + + _attribute_map = { + "os_type": {"key": "os-type", "type": "str"}, + "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, + } + + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: + """ + :keyword os_type: The OS type. Required. + :paramtype os_type: str + :keyword enable_fips_image: Whether the image is FIPS-enabled. Required. + :paramtype enable_fips_image: bool + """ + super().__init__(**kwargs) + self.os_type = os_type + self.enable_fips_image = enable_fips_image + + +class OutboundEnvironmentEndpoint(_serialization.Model): + """Egress endpoints which AKS agent nodes connect to for common purpose. + + :ivar category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. + :vartype category: str + :ivar endpoints: The endpoints that AKS agent nodes connect to. + :vartype endpoints: list[~azure.mgmt.containerservice.v2023_01_01.models.EndpointDependency] + """ + + _attribute_map = { + "category": {"key": "category", "type": "str"}, + "endpoints": {"key": "endpoints", "type": "[EndpointDependency]"}, + } + + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["_models.EndpointDependency"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. + :paramtype category: str + :keyword endpoints: The endpoints that AKS agent nodes connect to. + :paramtype endpoints: list[~azure.mgmt.containerservice.v2023_01_01.models.EndpointDependency] + """ + super().__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class OutboundEnvironmentEndpointCollection(_serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Collection of resources. Required. + :vartype value: + list[~azure.mgmt.containerservice.v2023_01_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + "value": {"required": True}, + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[OutboundEnvironmentEndpoint]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: + """ + :keyword value: Collection of resources. Required. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_01.models.OutboundEnvironmentEndpoint] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class PowerState(_serialization.Model): + """Describes the Power State of the cluster. + + :ivar code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and + "Stopped". + :vartype code: str or ~azure.mgmt.containerservice.v2023_01_01.models.Code + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + } + + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: + """ + :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and + "Stopped". + :paramtype code: str or ~azure.mgmt.containerservice.v2023_01_01.models.Code + """ + super().__init__(**kwargs) + self.code = code + + +class PrivateEndpoint(_serialization.Model): + """Private endpoint which a connection belongs to. + + :ivar id: The resource ID of the private endpoint. + :vartype id: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin + """ + :keyword id: The resource ID of the private endpoint. + :paramtype id: str + """ + super().__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(_serialization.Model): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private endpoint connection. + :vartype id: str + :ivar name: The name of the private endpoint connection. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar provisioning_state: The current provisioning state. Known values are: "Canceled", + "Creating", "Deleting", "Failed", and "Succeeded". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnectionProvisioningState + :ivar private_endpoint: The resource of private endpoint. + :vartype private_endpoint: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpoint"}, + "private_link_service_connection_state": { + "key": "properties.privateLinkServiceConnectionState", + "type": "PrivateLinkServiceConnectionState", + }, + } + + def __init__( + self, + *, + private_endpoint: Optional["_models.PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, + **kwargs: Any + ) -> None: + """ + :keyword private_endpoint: The resource of private endpoint. + :paramtype private_endpoint: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpoint + :keyword private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :paramtype private_link_service_connection_state: + ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkServiceConnectionState + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionListResult(_serialization.Model): + """A list of private endpoint connections. + + :ivar value: The collection value. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, + } + + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The collection value. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection] + """ + super().__init__(**kwargs) + self.value = value + + +class PrivateLinkResource(_serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private link resource. + :vartype id: str + :ivar name: The name of the private link resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar group_id: The group ID of the resource. + :vartype group_id: str + :ivar required_members: The RequiredMembers of the resource. + :vartype required_members: list[str] + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. + :vartype private_link_service_id: str + """ + + _validation = { + "private_link_service_id": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "group_id": {"key": "groupId", "type": "str"}, + "required_members": {"key": "requiredMembers", "type": "[str]"}, + "private_link_service_id": {"key": "privateLinkServiceID", "type": "str"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: The ID of the private link resource. + :paramtype id: str + :keyword name: The name of the private link resource. + :paramtype name: str + :keyword type: The resource type. + :paramtype type: str + :keyword group_id: The group ID of the resource. + :paramtype group_id: str + :keyword required_members: The RequiredMembers of the resource. + :paramtype required_members: list[str] + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.group_id = group_id + self.required_members = required_members + self.private_link_service_id = None + + +class PrivateLinkResourcesListResult(_serialization.Model): + """A list of private link resources. + + :ivar value: The collection value. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PrivateLinkResource]"}, + } + + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The collection value. + :paramtype value: list[~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource] + """ + super().__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(_serialization.Model): + """The state of a private link service connection. + + :ivar status: The private link service connection status. Known values are: "Pending", + "Approved", "Rejected", and "Disconnected". + :vartype status: str or ~azure.mgmt.containerservice.v2023_01_01.models.ConnectionStatus + :ivar description: The private link service connection description. + :vartype description: str + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "_models.ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: The private link service connection status. Known values are: "Pending", + "Approved", "Rejected", and "Disconnected". + :paramtype status: str or ~azure.mgmt.containerservice.v2023_01_01.models.ConnectionStatus + :keyword description: The private link service connection description. + :paramtype description: str + """ + super().__init__(**kwargs) + self.status = status + self.description = description + + +class ResourceReference(_serialization.Model): + """A reference to an Azure resource. + + :ivar id: The fully qualified Azure resource id. + :vartype id: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin + """ + :keyword id: The fully qualified Azure resource id. + :paramtype id: str + """ + super().__init__(**kwargs) + self.id = id + + +class RunCommandRequest(_serialization.Model): + """A run command request. + + All required parameters must be populated in order to send to Azure. + + :ivar command: The command to run. Required. + :vartype command: str + :ivar context: A base64 encoded zip file containing the files required by the command. + :vartype context: str + :ivar cluster_token: AuthToken issued for AKS AAD Server App. + :vartype cluster_token: str + """ + + _validation = { + "command": {"required": True}, + } + + _attribute_map = { + "command": {"key": "command", "type": "str"}, + "context": {"key": "context", "type": "str"}, + "cluster_token": {"key": "clusterToken", "type": "str"}, + } + + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword command: The command to run. Required. + :paramtype command: str + :keyword context: A base64 encoded zip file containing the files required by the command. + :paramtype context: str + :keyword cluster_token: AuthToken issued for AKS AAD Server App. + :paramtype cluster_token: str + """ + super().__init__(**kwargs) + self.command = command + self.context = context + self.cluster_token = cluster_token + + +class RunCommandResult(_serialization.Model): + """run command result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The command id. + :vartype id: str + :ivar provisioning_state: provisioning State. + :vartype provisioning_state: str + :ivar exit_code: The exit code of the command. + :vartype exit_code: int + :ivar started_at: The time when the command started. + :vartype started_at: ~datetime.datetime + :ivar finished_at: The time when the command finished. + :vartype finished_at: ~datetime.datetime + :ivar logs: The command output. + :vartype logs: str + :ivar reason: An explanation of why provisioningState is set to failed (if so). + :vartype reason: str + """ + + _validation = { + "id": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "exit_code": {"readonly": True}, + "started_at": {"readonly": True}, + "finished_at": {"readonly": True}, + "logs": {"readonly": True}, + "reason": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "exit_code": {"key": "properties.exitCode", "type": "int"}, + "started_at": {"key": "properties.startedAt", "type": "iso-8601"}, + "finished_at": {"key": "properties.finishedAt", "type": "iso-8601"}, + "logs": {"key": "properties.logs", "type": "str"}, + "reason": {"key": "properties.reason", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.provisioning_state = None + self.exit_code = None + self.started_at = None + self.finished_at = None + self.logs = None + self.reason = None + + +class Snapshot(TrackedResource): # pylint: disable=too-many-instance-attributes + """A node pool snapshot resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_01.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar creation_data: CreationData to be used to specify the source agent pool resource ID to + create this snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :ivar snapshot_type: The type of a snapshot. The default is NodePool. "NodePool" + :vartype snapshot_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.SnapshotType + :ivar kubernetes_version: The version of Kubernetes. + :vartype kubernetes_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is + Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and + "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_01.models.OSSKU + :ivar vm_size: The size of the VM. + :vartype vm_size: str + :ivar enable_fips: Whether to use a FIPS-enabled OS. + :vartype enable_fips: bool + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "kubernetes_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "os_type": {"readonly": True}, + "os_sku": {"readonly": True}, + "vm_size": {"readonly": True}, + "enable_fips": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "creation_data": {"key": "properties.creationData", "type": "CreationData"}, + "snapshot_type": {"key": "properties.snapshotType", "type": "str"}, + "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, + "node_image_version": {"key": "properties.nodeImageVersion", "type": "str"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "os_sku": {"key": "properties.osSku", "type": "str"}, + "vm_size": {"key": "properties.vmSize", "type": "str"}, + "enable_fips": {"key": "properties.enableFIPS", "type": "bool"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + creation_data: Optional["_models.CreationData"] = None, + snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword creation_data: CreationData to be used to specify the source agent pool resource ID to + create this snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_01.models.CreationData + :keyword snapshot_type: The type of a snapshot. The default is NodePool. "NodePool" + :paramtype snapshot_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.SnapshotType + """ + super().__init__(tags=tags, location=location, **kwargs) + self.creation_data = creation_data + self.snapshot_type = snapshot_type + self.kubernetes_version = None + self.node_image_version = None + self.os_type = None + self.os_sku = None + self.vm_size = None + self.enable_fips = None + + +class SnapshotListResult(_serialization.Model): + """The response from the List Snapshots operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of snapshots. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_01.models.Snapshot] + :ivar next_link: The URL to get the next set of snapshot results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[Snapshot]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of snapshots. + :paramtype value: list[~azure.mgmt.containerservice.v2023_01_01.models.Snapshot] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class SysctlConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Sysctl settings for Linux agent nodes. + + :ivar net_core_somaxconn: Sysctl setting net.core.somaxconn. + :vartype net_core_somaxconn: int + :ivar net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :vartype net_core_netdev_max_backlog: int + :ivar net_core_rmem_default: Sysctl setting net.core.rmem_default. + :vartype net_core_rmem_default: int + :ivar net_core_rmem_max: Sysctl setting net.core.rmem_max. + :vartype net_core_rmem_max: int + :ivar net_core_wmem_default: Sysctl setting net.core.wmem_default. + :vartype net_core_wmem_default: int + :ivar net_core_wmem_max: Sysctl setting net.core.wmem_max. + :vartype net_core_wmem_max: int + :ivar net_core_optmem_max: Sysctl setting net.core.optmem_max. + :vartype net_core_optmem_max: int + :ivar net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :vartype net_ipv4_tcp_max_syn_backlog: int + :ivar net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :vartype net_ipv4_tcp_max_tw_buckets: int + :ivar net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :vartype net_ipv4_tcp_fin_timeout: int + :ivar net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :vartype net_ipv4_tcp_keepalive_time: int + :ivar net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :vartype net_ipv4_tcp_keepalive_probes: int + :ivar net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :vartype net_ipv4_tcpkeepalive_intvl: int + :ivar net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :vartype net_ipv4_tcp_tw_reuse: bool + :ivar net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :vartype net_ipv4_ip_local_port_range: str + :ivar net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :vartype net_ipv4_neigh_default_gc_thresh1: int + :ivar net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :vartype net_ipv4_neigh_default_gc_thresh2: int + :ivar net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :vartype net_ipv4_neigh_default_gc_thresh3: int + :ivar net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :vartype net_netfilter_nf_conntrack_max: int + :ivar net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :vartype net_netfilter_nf_conntrack_buckets: int + :ivar fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :vartype fs_inotify_max_user_watches: int + :ivar fs_file_max: Sysctl setting fs.file-max. + :vartype fs_file_max: int + :ivar fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :vartype fs_aio_max_nr: int + :ivar fs_nr_open: Sysctl setting fs.nr_open. + :vartype fs_nr_open: int + :ivar kernel_threads_max: Sysctl setting kernel.threads-max. + :vartype kernel_threads_max: int + :ivar vm_max_map_count: Sysctl setting vm.max_map_count. + :vartype vm_max_map_count: int + :ivar vm_swappiness: Sysctl setting vm.swappiness. + :vartype vm_swappiness: int + :ivar vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :vartype vm_vfs_cache_pressure: int + """ + + _attribute_map = { + "net_core_somaxconn": {"key": "netCoreSomaxconn", "type": "int"}, + "net_core_netdev_max_backlog": {"key": "netCoreNetdevMaxBacklog", "type": "int"}, + "net_core_rmem_default": {"key": "netCoreRmemDefault", "type": "int"}, + "net_core_rmem_max": {"key": "netCoreRmemMax", "type": "int"}, + "net_core_wmem_default": {"key": "netCoreWmemDefault", "type": "int"}, + "net_core_wmem_max": {"key": "netCoreWmemMax", "type": "int"}, + "net_core_optmem_max": {"key": "netCoreOptmemMax", "type": "int"}, + "net_ipv4_tcp_max_syn_backlog": {"key": "netIpv4TcpMaxSynBacklog", "type": "int"}, + "net_ipv4_tcp_max_tw_buckets": {"key": "netIpv4TcpMaxTwBuckets", "type": "int"}, + "net_ipv4_tcp_fin_timeout": {"key": "netIpv4TcpFinTimeout", "type": "int"}, + "net_ipv4_tcp_keepalive_time": {"key": "netIpv4TcpKeepaliveTime", "type": "int"}, + "net_ipv4_tcp_keepalive_probes": {"key": "netIpv4TcpKeepaliveProbes", "type": "int"}, + "net_ipv4_tcpkeepalive_intvl": {"key": "netIpv4TcpkeepaliveIntvl", "type": "int"}, + "net_ipv4_tcp_tw_reuse": {"key": "netIpv4TcpTwReuse", "type": "bool"}, + "net_ipv4_ip_local_port_range": {"key": "netIpv4IpLocalPortRange", "type": "str"}, + "net_ipv4_neigh_default_gc_thresh1": {"key": "netIpv4NeighDefaultGcThresh1", "type": "int"}, + "net_ipv4_neigh_default_gc_thresh2": {"key": "netIpv4NeighDefaultGcThresh2", "type": "int"}, + "net_ipv4_neigh_default_gc_thresh3": {"key": "netIpv4NeighDefaultGcThresh3", "type": "int"}, + "net_netfilter_nf_conntrack_max": {"key": "netNetfilterNfConntrackMax", "type": "int"}, + "net_netfilter_nf_conntrack_buckets": {"key": "netNetfilterNfConntrackBuckets", "type": "int"}, + "fs_inotify_max_user_watches": {"key": "fsInotifyMaxUserWatches", "type": "int"}, + "fs_file_max": {"key": "fsFileMax", "type": "int"}, + "fs_aio_max_nr": {"key": "fsAioMaxNr", "type": "int"}, + "fs_nr_open": {"key": "fsNrOpen", "type": "int"}, + "kernel_threads_max": {"key": "kernelThreadsMax", "type": "int"}, + "vm_max_map_count": {"key": "vmMaxMapCount", "type": "int"}, + "vm_swappiness": {"key": "vmSwappiness", "type": "int"}, + "vm_vfs_cache_pressure": {"key": "vmVfsCachePressure", "type": "int"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. + :paramtype net_core_somaxconn: int + :keyword net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :paramtype net_core_netdev_max_backlog: int + :keyword net_core_rmem_default: Sysctl setting net.core.rmem_default. + :paramtype net_core_rmem_default: int + :keyword net_core_rmem_max: Sysctl setting net.core.rmem_max. + :paramtype net_core_rmem_max: int + :keyword net_core_wmem_default: Sysctl setting net.core.wmem_default. + :paramtype net_core_wmem_default: int + :keyword net_core_wmem_max: Sysctl setting net.core.wmem_max. + :paramtype net_core_wmem_max: int + :keyword net_core_optmem_max: Sysctl setting net.core.optmem_max. + :paramtype net_core_optmem_max: int + :keyword net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :paramtype net_ipv4_tcp_max_syn_backlog: int + :keyword net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :paramtype net_ipv4_tcp_max_tw_buckets: int + :keyword net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :paramtype net_ipv4_tcp_fin_timeout: int + :keyword net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :paramtype net_ipv4_tcp_keepalive_time: int + :keyword net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :paramtype net_ipv4_tcp_keepalive_probes: int + :keyword net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :paramtype net_ipv4_tcpkeepalive_intvl: int + :keyword net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :paramtype net_ipv4_tcp_tw_reuse: bool + :keyword net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :paramtype net_ipv4_ip_local_port_range: str + :keyword net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :paramtype net_ipv4_neigh_default_gc_thresh1: int + :keyword net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :paramtype net_ipv4_neigh_default_gc_thresh2: int + :keyword net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :paramtype net_ipv4_neigh_default_gc_thresh3: int + :keyword net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :paramtype net_netfilter_nf_conntrack_max: int + :keyword net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :paramtype net_netfilter_nf_conntrack_buckets: int + :keyword fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :paramtype fs_inotify_max_user_watches: int + :keyword fs_file_max: Sysctl setting fs.file-max. + :paramtype fs_file_max: int + :keyword fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :paramtype fs_aio_max_nr: int + :keyword fs_nr_open: Sysctl setting fs.nr_open. + :paramtype fs_nr_open: int + :keyword kernel_threads_max: Sysctl setting kernel.threads-max. + :paramtype kernel_threads_max: int + :keyword vm_max_map_count: Sysctl setting vm.max_map_count. + :paramtype vm_max_map_count: int + :keyword vm_swappiness: Sysctl setting vm.swappiness. + :paramtype vm_swappiness: int + :keyword vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :paramtype vm_vfs_cache_pressure: int + """ + super().__init__(**kwargs) + self.net_core_somaxconn = net_core_somaxconn + self.net_core_netdev_max_backlog = net_core_netdev_max_backlog + self.net_core_rmem_default = net_core_rmem_default + self.net_core_rmem_max = net_core_rmem_max + self.net_core_wmem_default = net_core_wmem_default + self.net_core_wmem_max = net_core_wmem_max + self.net_core_optmem_max = net_core_optmem_max + self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog + self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets + self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout + self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time + self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes + self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl + self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse + self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range + self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 + self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 + self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 + self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max + self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets + self.fs_inotify_max_user_watches = fs_inotify_max_user_watches + self.fs_file_max = fs_file_max + self.fs_aio_max_nr = fs_aio_max_nr + self.fs_nr_open = fs_nr_open + self.kernel_threads_max = kernel_threads_max + self.vm_max_map_count = vm_max_map_count + self.vm_swappiness = vm_swappiness + self.vm_vfs_cache_pressure = vm_vfs_cache_pressure + + +class SystemData(_serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.containerservice.v2023_01_01.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :paramtype created_by_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", and "Key". + :paramtype last_modified_by_type: str or + ~azure.mgmt.containerservice.v2023_01_01.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super().__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TagsObject(_serialization.Model): + """Tags object for patch operations. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + } + + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + """ + super().__init__(**kwargs) + self.tags = tags + + +class TimeInWeek(_serialization.Model): + """Time in a week. + + :ivar day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", and "Saturday". + :vartype day: str or ~azure.mgmt.containerservice.v2023_01_01.models.WeekDay + :ivar hour_slots: Each integer hour represents a time range beginning at 0m after the hour + ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 + UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + :vartype hour_slots: list[int] + """ + + _attribute_map = { + "day": {"key": "day", "type": "str"}, + "hour_slots": {"key": "hourSlots", "type": "[int]"}, + } + + def __init__( + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: + """ + :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", and "Saturday". + :paramtype day: str or ~azure.mgmt.containerservice.v2023_01_01.models.WeekDay + :keyword hour_slots: Each integer hour represents a time range beginning at 0m after the hour + ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 + UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + :paramtype hour_slots: list[int] + """ + super().__init__(**kwargs) + self.day = day + self.hour_slots = hour_slots + + +class TimeSpan(_serialization.Model): + """For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + + :ivar start: The start of a time span. + :vartype start: ~datetime.datetime + :ivar end: The end of a time span. + :vartype end: ~datetime.datetime + """ + + _attribute_map = { + "start": {"key": "start", "type": "iso-8601"}, + "end": {"key": "end", "type": "iso-8601"}, + } + + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: + """ + :keyword start: The start of a time span. + :paramtype start: ~datetime.datetime + :keyword end: The end of a time span. + :paramtype end: ~datetime.datetime + """ + super().__init__(**kwargs) + self.start = start + self.end = end + + +class WindowsGmsaProfile(_serialization.Model): + """Windows gMSA Profile in the managed cluster. + + :ivar enabled: Specifies whether to enable Windows gMSA in the managed cluster. + :vartype enabled: bool + :ivar dns_server: Specifies the DNS server for Windows gMSA. :code:`
`:code:`
` Set it to + empty if you have configured the DNS server in the vnet which is used to create the managed + cluster. + :vartype dns_server: str + :ivar root_domain_name: Specifies the root domain name for Windows gMSA. + :code:`
`:code:`
` Set it to empty if you have configured the DNS server in the vnet + which is used to create the managed cluster. + :vartype root_domain_name: str + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "dns_server": {"key": "dnsServer", "type": "str"}, + "root_domain_name": {"key": "rootDomainName", "type": "str"}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + dns_server: Optional[str] = None, + root_domain_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. + :paramtype enabled: bool + :keyword dns_server: Specifies the DNS server for Windows gMSA. :code:`
`:code:`
` Set it + to empty if you have configured the DNS server in the vnet which is used to create the managed + cluster. + :paramtype dns_server: str + :keyword root_domain_name: Specifies the root domain name for Windows gMSA. + :code:`
`:code:`
` Set it to empty if you have configured the DNS server in the vnet + which is used to create the managed cluster. + :paramtype root_domain_name: str + """ + super().__init__(**kwargs) + self.enabled = enabled + self.dns_server = dns_server + self.root_domain_name = root_domain_name diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/models/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/__init__.py new file mode 100644 index 000000000000..6b6648716199 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/__init__.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations +from ._snapshots_operations import SnapshotsOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "ManagedClustersOperations", + "MaintenanceConfigurationsOperations", + "AgentPoolsOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", + "ResolvePrivateLinkServiceIdOperations", + "SnapshotsOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_agent_pools_operations.py new file mode 100644 index 000000000000..47751dca0b50 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_agent_pools_operations.py @@ -0,0 +1,1328 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_abort_latest_operation_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_upgrade_profile_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_available_agent_pool_versions_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_upgrade_node_image_version_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class AgentPoolsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`agent_pools` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace + def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Aborts last operation running on agent pool. + + Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a + Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + completes before cancellation can take place, a 409 error code is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace + def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterable["_models.AgentPool"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPool or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPoolListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AgentPoolListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools" + } + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPool: + """Gets the specified managed cluster agent pool. + + Gets the specified managed cluster agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> _models.AgentPool: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "AgentPool") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _models.AgentPool, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPool or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace + def begin_delete( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an agent pool in the specified managed cluster. + + Deletes an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace + def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPoolUpgradeProfile: + """Gets the upgrade profile for an agent pool. + + Gets the upgrade profile for an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default" + } + + @distributed_trace + def get_available_agent_pool_versions( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.AgentPoolAvailableVersions: + """Gets a list of supported Kubernetes versions for the specified agent pool. + + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.AgentPoolAvailableVersions + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) + + request = build_get_available_agent_pool_versions_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_available_agent_pool_versions.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolAvailableVersions", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_available_agent_pool_versions.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions" + } + + def _upgrade_node_image_version_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Optional[_models.AgentPool]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[Optional[_models.AgentPool]] = kwargs.pop("cls", None) + + request = build_upgrade_node_image_version_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._upgrade_node_image_version_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _upgrade_node_image_version_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } + + @distributed_trace + def begin_upgrade_node_image_version( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Upgrades the node image version of an agent pool to the latest. + + Upgrading the node image version of an agent pool applies the newest OS and runtime updates to + the nodes. AKS provides one new image per week with the latest updates. For more details on + node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_upgrade_node_image_version.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_maintenance_configurations_operations.py new file mode 100644 index 000000000000..7bf5f193c993 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_maintenance_configurations_operations.py @@ -0,0 +1,611 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_managed_cluster_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, resource_name: str, config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "configName": _SERIALIZER.url("config_name", config_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "configName": _SERIALIZER.url("config_name", config_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, resource_name: str, config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "configName": _SERIALIZER.url("config_name", config_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class MaintenanceConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterable["_models.MaintenanceConfiguration"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfiguration or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.MaintenanceConfigurationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_managed_cluster.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("MaintenanceConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_managed_cluster.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations" + } + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Gets the specified maintenance configuration of a managed cluster. + + Gets the specified maintenance configuration of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: _models.MaintenanceConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, IO], + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "MaintenanceConfiguration") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes a maintenance configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_managed_clusters_operations.py new file mode 100644 index 000000000000..5e59874bd828 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_managed_clusters_operations.py @@ -0,0 +1,3636 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_get_os_options_request( + location: str, subscription_id: str, *, resource_type: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if resource_type is not None: + _params["resource-type"] = _SERIALIZER.query("resource_type", resource_type, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_upgrade_profile_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_access_profile_request( + resource_group_name: str, resource_name: str, role_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_cluster_admin_credentials_request( + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + server_fqdn: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if server_fqdn is not None: + _params["server-fqdn"] = _SERIALIZER.query("server_fqdn", server_fqdn, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_cluster_user_credentials_request( + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + server_fqdn: Optional[str] = None, + format: Optional[Union[str, _models.Format]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if server_fqdn is not None: + _params["server-fqdn"] = _SERIALIZER.query("server_fqdn", server_fqdn, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_cluster_monitoring_user_credentials_request( + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + server_fqdn: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if server_fqdn is not None: + _params["server-fqdn"] = _SERIALIZER.query("server_fqdn", server_fqdn, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_update_tags_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reset_service_principal_profile_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reset_aad_profile_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rotate_cluster_certificates_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_abort_latest_operation_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rotate_service_account_signing_keys_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_stop_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_start_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_run_command_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_command_result_request( + resource_group_name: str, resource_name: str, command_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "commandId": _SERIALIZER.url("command_id", command_id, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_outbound_network_dependencies_endpoints_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class ManagedClustersOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`managed_clusters` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_os_options( + self, location: str, resource_type: Optional[str] = None, **kwargs: Any + ) -> _models.OSOptionProfile: + """Gets supported OS options in the specified subscription. + + Gets supported OS options in the specified subscription. + + :param location: The name of Azure region. Required. + :type location: str + :param resource_type: The resource type for which the OS options needs to be returned. Default + value is None. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.OSOptionProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.OSOptionProfile] = kwargs.pop("cls", None) + + request = build_get_os_options_request( + location=location, + subscription_id=self._config.subscription_id, + resource_type=resource_type, + api_version=api_version, + template_url=self.get_os_options.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("OSOptionProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_os_options.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + } + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.ManagedCluster"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters"} + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.ManagedCluster"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters" + } + + @distributed_trace + def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.ManagedClusterUpgradeProfile: + """Gets the upgrade profile of a managed cluster. + + Gets the upgrade profile of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default" + } + + @distributed_trace + def get_access_profile( + self, resource_group_name: str, resource_name: str, role_name: str, **kwargs: Any + ) -> _models.ManagedClusterAccessProfile: + """Gets an access profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Instead use `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. Required. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAccessProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) + + request = build_get_access_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + role_name=role_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_access_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterAccessProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_access_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential" + } + + @distributed_trace + def list_cluster_admin_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the admin credentials of a managed cluster. + + Lists the admin credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_admin_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_admin_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_admin_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential" + } + + @distributed_trace + def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + format: Optional[Union[str, _models.Format]] = None, + **kwargs: Any + ) -> _models.CredentialResults: + """Lists the user credentials of a managed cluster. + + Lists the user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :param format: Only apply to AAD clusters, specifies the format of returned kubeconfig. Format + 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format + kubeconfig, which requires kubelogin binary in the path. Known values are: "azure" and "exec". + Default value is None. + :type format: str or ~azure.mgmt.containerservice.v2023_01_01.models.Format + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + format=format, + api_version=api_version, + template_url=self.list_cluster_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential" + } + + @distributed_trace + def list_cluster_monitoring_user_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the cluster monitoring user credentials of a managed cluster. + + Lists the cluster monitoring user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_monitoring_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_monitoring_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_monitoring_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential" + } + + @distributed_trace + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: + """Gets a managed cluster. + + Gets a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _create_or_update_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedCluster") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedCluster, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _update_tags_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_tags_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either + a TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @distributed_trace + def begin_delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes a managed cluster. + + Deletes a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _reset_service_principal_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterServicePrincipalProfile") + + request = build_reset_service_principal_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_service_principal_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_service_principal_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + @overload + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterServicePrincipalProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterServicePrincipalProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Is either a + ManagedClusterServicePrincipalProfile type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterServicePrincipalProfile or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_service_principal_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + def _reset_aad_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterAADProfile") + + request = build_reset_aad_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_aad_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_aad_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + @overload + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterAADProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAADProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.ManagedClusterAADProfile or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reset_aad_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_aad_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + def _rotate_cluster_certificates_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_cluster_certificates_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_cluster_certificates_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_cluster_certificates_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + @distributed_trace + def begin_rotate_cluster_certificates( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Rotates the certificates of a managed cluster. + + See `Certificate rotation `_ for + more details about rotating managed cluster certificates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rotate_cluster_certificates_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_cluster_certificates.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + @distributed_trace + def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Aborts last operation running on managed cluster. + + Aborts the currently running operation on the managed cluster. The Managed Cluster will be + moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If + the operation completes before cancellation can take place, a 409 error code is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + def _rotate_service_account_signing_keys_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_service_account_signing_keys_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_service_account_signing_keys_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_service_account_signing_keys_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + @distributed_trace + def begin_rotate_service_account_signing_keys( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Rotates the service account signing keys of a managed cluster. + + Rotates the service account signing keys of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rotate_service_account_signing_keys_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_service_account_signing_keys.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + def _stop_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_stop_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _stop_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + @distributed_trace + def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: + """Stops a Managed Cluster. + + This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a + cluster stops the control plane and agent nodes entirely, while maintaining all object and + cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster + `_ for more details about stopping a + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._stop_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_stop.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + def _start_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_start_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _start_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + @distributed_trace + def begin_start(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: + """Starts a previously stopped Managed Cluster. + + See `starting a cluster `_ for more + details about starting a cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._start_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_start.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(request_payload, (IO, bytes)): + _content = request_payload + else: + _json = self._serialize.body(request_payload, "RunCommandRequest") + + request = build_run_command_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._run_command_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _run_command_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @overload + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: _models.RunCommandRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: ~azure.mgmt.containerservice.v2023_01_01.models.RunCommandRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. + :type request_payload: ~azure.mgmt.containerservice.v2023_01_01.models.RunCommandRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("RunCommandResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_run_command.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @distributed_trace + def get_command_result( + self, resource_group_name: str, resource_name: str, command_id: str, **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + """Gets the results of a command which has been run on the Managed Cluster. + + Gets the results of a command which has been run on the Managed Cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param command_id: Id of the command. Required. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult or None or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.RunCommandResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + request = build_get_command_result_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + command_id=command_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_command_result.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + get_command_result.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}" + } + + @distributed_trace + def list_outbound_network_dependencies_endpoints( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterable["_models.OutboundEnvironmentEndpoint"]: + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. + + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpoint or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.OutboundEnvironmentEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.OutboundEnvironmentEndpointCollection] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_outbound_network_dependencies_endpoints.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OutboundEnvironmentEndpointCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_outbound_network_dependencies_endpoints.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_operations.py new file mode 100644 index 000000000000..2c830134f603 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_operations.py @@ -0,0 +1,161 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.ContainerService/operations") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.OperationValue"]: + """Gets a list of operations. + + Gets a list of operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationValue or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.OperationValue] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.ContainerService/operations"} diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..62b1e50c6a5d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,656 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request( + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnectionListResult: + """Gets a list of private endpoint connections in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnectionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections" + } + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the specified private endpoint connection. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, IO], + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateEndpointConnection") + + request = build_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @distributed_trace + def begin_delete( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a private endpoint connection. + + Deletes a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..34a1d824bf8b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_private_link_resources_operations.py @@ -0,0 +1,165 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`private_link_resources` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResourcesListResult: + """Gets a list of private link resources in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResourcesListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.PrivateLinkResourcesListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResourcesListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 000000000000..0f49bdf0a754 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,249 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_post_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ResolvePrivateLinkServiceIdOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`resolve_private_link_service_id` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def post( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.PrivateLinkResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def post( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def post( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.PrivateLinkResource, IO], + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Is either + a PrivateLinkResource type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateLinkResource") + + request = build_post_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + post.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_snapshots_operations.py new file mode 100644 index 000000000000..2a84be1efd33 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/operations/_snapshots_operations.py @@ -0,0 +1,861 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_update_tags_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class SnapshotsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_01.ContainerServiceClient`'s + :attr:`snapshots` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. + + Gets a list of snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots"} + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Snapshot"]: + """Lists snapshots in the specified subscription and resource group. + + Lists snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_01.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots" + } + + @distributed_trace + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: + """Gets a snapshot. + + Gets a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.Snapshot, IO], **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Snapshot") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_01.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_01.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update_tags.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """Deletes a snapshot. + + Deletes a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/py.typed b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/__init__.py new file mode 100644 index 000000000000..4f004a298ed4 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/__init__.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ContainerServiceClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_configuration.py new file mode 100644 index 000000000000..c2f8eb01ca0f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_configuration.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2023-01-02-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-01-02-preview"] = kwargs.pop("api_version", "2023-01-02-preview") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_container_service_client.py new file mode 100644 index 000000000000..e961cbd5ec5a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_container_service_client.py @@ -0,0 +1,159 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, TYPE_CHECKING + +from azure.core.rest import HttpRequest, HttpResponse +from azure.mgmt.core import ARMPipelineClient + +from . import models as _models +from .._serialization import Deserializer, Serializer +from ._configuration import ContainerServiceClientConfiguration +from .operations import ( + AgentPoolsOperations, + MaintenanceConfigurationsOperations, + ManagedClusterSnapshotsOperations, + ManagedClustersOperations, + Operations, + PrivateEndpointConnectionsOperations, + PrivateLinkResourcesOperations, + ResolvePrivateLinkServiceIdOperations, + SnapshotsOperations, + TrustedAccessRoleBindingsOperations, + TrustedAccessRolesOperations, +) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2023_01_02_preview.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: + azure.mgmt.containerservice.v2023_01_02_preview.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: + azure.mgmt.containerservice.v2023_01_02_preview.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: + azure.mgmt.containerservice.v2023_01_02_preview.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.containerservice.v2023_01_02_preview.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.containerservice.v2023_01_02_preview.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: + azure.mgmt.containerservice.v2023_01_02_preview.operations.ResolvePrivateLinkServiceIdOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: + azure.mgmt.containerservice.v2023_01_02_preview.operations.SnapshotsOperations + :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations + :vartype managed_cluster_snapshots: + azure.mgmt.containerservice.v2023_01_02_preview.operations.ManagedClusterSnapshotsOperations + :ivar trusted_access_roles: TrustedAccessRolesOperations operations + :vartype trusted_access_roles: + azure.mgmt.containerservice.v2023_01_02_preview.operations.TrustedAccessRolesOperations + :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations + :vartype trusted_access_role_bindings: + azure.mgmt.containerservice.v2023_01_02_preview.operations.TrustedAccessRoleBindingsOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2023-01-02-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = ContainerServiceClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) + self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.trusted_access_roles = TrustedAccessRolesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> "ContainerServiceClient": + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_metadata.json new file mode 100644 index 000000000000..4b3582b2d923 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_metadata.json @@ -0,0 +1,120 @@ +{ + "chosen_version": "2023-01-02-preview", + "total_api_version_list": ["2023-01-02-preview"], + "client": { + "name": "ContainerServiceClient", + "filename": "_container_service_client", + "description": "The Container Service Client.", + "host_value": "\"https://management.azure.com\"", + "parameterized_host_template": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"azurecore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"azurecore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential: \"TokenCredential\",", + "description": "Credential needed for the client to connect to Azure. Required.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true, + "method_location": "positional" + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription. Required.", + "docstring_type": "str", + "required": true, + "method_location": "positional" + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure. Required.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription. Required.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version: Optional[str]=None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "profile": { + "signature": "profile: KnownProfiles=KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false, + "method_location": "positional" + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false, + "method_location": "positional" + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "managed_clusters": "ManagedClustersOperations", + "maintenance_configurations": "MaintenanceConfigurationsOperations", + "agent_pools": "AgentPoolsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", + "resolve_private_link_service_id": "ResolvePrivateLinkServiceIdOperations", + "snapshots": "SnapshotsOperations", + "managed_cluster_snapshots": "ManagedClusterSnapshotsOperations", + "trusted_access_roles": "TrustedAccessRolesOperations", + "trusted_access_role_bindings": "TrustedAccessRoleBindingsOperations" + } +} diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_vendor.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_vendor.py new file mode 100644 index 000000000000..bd0df84f5319 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_vendor.py @@ -0,0 +1,30 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import List, cast + +from azure.core.pipeline.transport import HttpRequest + + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] + template = "/".join(components) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/__init__.py new file mode 100644 index 000000000000..d14e96ddb36e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ContainerServiceClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_configuration.py new file mode 100644 index 000000000000..3e464e851d61 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_configuration.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2023-01-02-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-01-02-preview"] = kwargs.pop("api_version", "2023-01-02-preview") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_container_service_client.py new file mode 100644 index 000000000000..2b0b8d5b9c0e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_container_service_client.py @@ -0,0 +1,159 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models as _models +from ..._serialization import Deserializer, Serializer +from ._configuration import ContainerServiceClientConfiguration +from .operations import ( + AgentPoolsOperations, + MaintenanceConfigurationsOperations, + ManagedClusterSnapshotsOperations, + ManagedClustersOperations, + Operations, + PrivateEndpointConnectionsOperations, + PrivateLinkResourcesOperations, + ResolvePrivateLinkServiceIdOperations, + SnapshotsOperations, + TrustedAccessRoleBindingsOperations, + TrustedAccessRolesOperations, +) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.ResolvePrivateLinkServiceIdOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.SnapshotsOperations + :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations + :vartype managed_cluster_snapshots: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.ManagedClusterSnapshotsOperations + :ivar trusted_access_roles: TrustedAccessRolesOperations operations + :vartype trusted_access_roles: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.TrustedAccessRolesOperations + :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations + :vartype trusted_access_role_bindings: + azure.mgmt.containerservice.v2023_01_02_preview.aio.operations.TrustedAccessRoleBindingsOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2023-01-02-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = ContainerServiceClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) + self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.trusted_access_roles = TrustedAccessRolesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/__init__.py new file mode 100644 index 000000000000..2575b4af3658 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/__init__.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations +from ._snapshots_operations import SnapshotsOperations +from ._managed_cluster_snapshots_operations import ManagedClusterSnapshotsOperations +from ._trusted_access_roles_operations import TrustedAccessRolesOperations +from ._trusted_access_role_bindings_operations import TrustedAccessRoleBindingsOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "ManagedClustersOperations", + "MaintenanceConfigurationsOperations", + "AgentPoolsOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", + "ResolvePrivateLinkServiceIdOperations", + "SnapshotsOperations", + "ManagedClusterSnapshotsOperations", + "TrustedAccessRolesOperations", + "TrustedAccessRoleBindingsOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_agent_pools_operations.py new file mode 100644 index 000000000000..b5d311a3e71d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_agent_pools_operations.py @@ -0,0 +1,1042 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._agent_pools_operations import ( + build_abort_latest_operation_request, + build_create_or_update_request, + build_delete_request, + build_get_available_agent_pool_versions_request, + build_get_request, + build_get_upgrade_profile_request, + build_list_request, + build_upgrade_node_image_version_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class AgentPoolsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`agent_pools` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace_async + async def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Aborts last operation running on agent pool. + + Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a + Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + completes before cancellation can take place, an error is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace + def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> AsyncIterable["_models.AgentPool"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPool or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPoolListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AgentPoolListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPool: + """Gets the specified managed cluster agent pool. + + Gets the specified managed cluster agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> _models.AgentPool: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "AgentPool") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _models.AgentPool, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool in the specified managed cluster. + + Deletes an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods on + a node without considering Pod Disruption Budget. Default value is None. + :type ignore_pod_disruption_budget: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace_async + async def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPoolUpgradeProfile: + """Gets the upgrade profile for an agent pool. + + Gets the upgrade profile for an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default" + } + + @distributed_trace_async + async def get_available_agent_pool_versions( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.AgentPoolAvailableVersions: + """Gets a list of supported Kubernetes versions for the specified agent pool. + + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolAvailableVersions + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) + + request = build_get_available_agent_pool_versions_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_available_agent_pool_versions.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolAvailableVersions", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_available_agent_pool_versions.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions" + } + + async def _upgrade_node_image_version_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Optional[_models.AgentPool]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[Optional[_models.AgentPool]] = kwargs.pop("cls", None) + + request = build_upgrade_node_image_version_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._upgrade_node_image_version_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _upgrade_node_image_version_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } + + @distributed_trace_async + async def begin_upgrade_node_image_version( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.AgentPool]: + """Upgrades the node image version of an agent pool to the latest. + + Upgrading the node image version of an agent pool applies the newest OS and runtime updates to + the nodes. AKS provides one new image per week with the latest updates. For more details on + node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_upgrade_node_image_version.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_maintenance_configurations_operations.py new file mode 100644 index 000000000000..482c78a27775 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -0,0 +1,457 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._maintenance_configurations_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_managed_cluster_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class MaintenanceConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncIterable["_models.MaintenanceConfiguration"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfiguration or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.MaintenanceConfigurationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_managed_cluster.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("MaintenanceConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_managed_cluster.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Gets the specified maintenance configuration of a managed cluster. + + Gets the specified maintenance configuration of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: _models.MaintenanceConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, IO], + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "MaintenanceConfiguration") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes a maintenance configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_cluster_snapshots_operations.py new file mode 100644 index 000000000000..bd3b60119cc9 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -0,0 +1,676 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._managed_cluster_snapshots_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_resource_group_request, + build_list_request, + build_update_tags_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ManagedClusterSnapshotsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`managed_cluster_snapshots` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedClusterSnapshot"]: + """Gets a list of managed cluster snapshots in the specified subscription. + + Gets a list of managed cluster snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterSnapshot or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" + } + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterSnapshot"]: + """Lists managed cluster snapshots in the specified subscription and resource group. + + Lists managed cluster snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterSnapshot or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots" + } + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: + """Gets a managed cluster snapshot. + + Gets a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterSnapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterSnapshot, IO], + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterSnapshot") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Is either a TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update_tags.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """Deletes a managed cluster snapshot. + + Deletes a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_clusters_operations.py new file mode 100644 index 000000000000..8734a320d275 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,2857 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._managed_clusters_operations import ( + build_abort_latest_operation_request, + build_create_or_update_request, + build_delete_request, + build_get_access_profile_request, + build_get_command_result_request, + build_get_os_options_request, + build_get_request, + build_get_upgrade_profile_request, + build_list_by_resource_group_request, + build_list_cluster_admin_credentials_request, + build_list_cluster_monitoring_user_credentials_request, + build_list_cluster_user_credentials_request, + build_list_outbound_network_dependencies_endpoints_request, + build_list_request, + build_reset_aad_profile_request, + build_reset_service_principal_profile_request, + build_rotate_cluster_certificates_request, + build_rotate_service_account_signing_keys_request, + build_run_command_request, + build_start_request, + build_stop_request, + build_update_tags_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ManagedClustersOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`managed_clusters` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_os_options( + self, location: str, resource_type: Optional[str] = None, **kwargs: Any + ) -> _models.OSOptionProfile: + """Gets supported OS options in the specified subscription. + + Gets supported OS options in the specified subscription. + + :param location: The name of Azure region. Required. + :type location: str + :param resource_type: The resource type for which the OS options needs to be returned. Default + value is None. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSOptionProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.OSOptionProfile] = kwargs.pop("cls", None) + + request = build_get_os_options_request( + location=location, + subscription_id=self._config.subscription_id, + resource_type=resource_type, + api_version=api_version, + template_url=self.get_os_options.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("OSOptionProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_os_options.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + } + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedCluster"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters"} + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.ManagedCluster"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters" + } + + @distributed_trace_async + async def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.ManagedClusterUpgradeProfile: + """Gets the upgrade profile of a managed cluster. + + Gets the upgrade profile of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default" + } + + @distributed_trace_async + async def get_access_profile( + self, resource_group_name: str, resource_name: str, role_name: str, **kwargs: Any + ) -> _models.ManagedClusterAccessProfile: + """Gets an access profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Instead use `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. Required. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAccessProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) + + request = build_get_access_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + role_name=role_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_access_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterAccessProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_access_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential" + } + + @distributed_trace_async + async def list_cluster_admin_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the admin credentials of a managed cluster. + + Lists the admin credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_admin_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_admin_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_admin_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential" + } + + @distributed_trace_async + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + format: Optional[Union[str, _models.Format]] = None, + **kwargs: Any + ) -> _models.CredentialResults: + """Lists the user credentials of a managed cluster. + + Lists the user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :param format: Only apply to AAD clusters, specifies the format of returned kubeconfig. Format + 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format + kubeconfig, which requires kubelogin binary in the path. Known values are: "azure" and "exec". + Default value is None. + :type format: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Format + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + format=format, + api_version=api_version, + template_url=self.list_cluster_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential" + } + + @distributed_trace_async + async def list_cluster_monitoring_user_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the cluster monitoring user credentials of a managed cluster. + + Lists the cluster monitoring user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_monitoring_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_monitoring_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_monitoring_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential" + } + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: + """Gets a managed cluster. + + Gets a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _create_or_update_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedCluster") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedCluster, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _update_tags_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_tags_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either + a TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods on + a node without considering Pod Disruption Budget. Default value is None. + :type ignore_pod_disruption_budget: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + async def _reset_service_principal_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterServicePrincipalProfile") + + request = build_reset_service_principal_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_service_principal_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_service_principal_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + @overload + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterServicePrincipalProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterServicePrincipalProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Is either a + ManagedClusterServicePrincipalProfile type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterServicePrincipalProfile + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_service_principal_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + async def _reset_aad_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterAADProfile") + + request = build_reset_aad_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_aad_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_aad_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + @overload + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterAADProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAADProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAADProfile or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_aad_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + async def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + @distributed_trace_async + async def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Aborts last operation running on managed cluster. + + Aborts the currently running operation on the managed cluster. The Managed Cluster will be + moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If + the operation completes before cancellation can take place, an error is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + async def _rotate_cluster_certificates_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_cluster_certificates_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_cluster_certificates_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_cluster_certificates_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + @distributed_trace_async + async def begin_rotate_cluster_certificates( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotates the certificates of a managed cluster. + + See `Certificate rotation `_ for + more details about rotating managed cluster certificates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._rotate_cluster_certificates_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_cluster_certificates.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + async def _rotate_service_account_signing_keys_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_service_account_signing_keys_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_service_account_signing_keys_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_service_account_signing_keys_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + @distributed_trace_async + async def begin_rotate_service_account_signing_keys( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotates the service account signing keys of a managed cluster. + + Rotates the service account signing keys of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._rotate_service_account_signing_keys_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_service_account_signing_keys.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + async def _stop_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_stop_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _stop_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + @distributed_trace_async + async def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Stops a Managed Cluster. + + This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a + cluster stops the control plane and agent nodes entirely, while maintaining all object and + cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster + `_ for more details about stopping a + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._stop_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_stop.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + async def _start_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_start_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _start_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + @distributed_trace_async + async def begin_start(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Starts a previously stopped Managed Cluster. + + See `starting a cluster `_ for more + details about starting a cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._start_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_start.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + async def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(request_payload, (IO, bytes)): + _content = request_payload + else: + _json = self._serialize.body(request_payload, "RunCommandRequest") + + request = build_run_command_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._run_command_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _run_command_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @overload + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: _models.RunCommandRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. + :type request_payload: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("RunCommandResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_run_command.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @distributed_trace_async + async def get_command_result( + self, resource_group_name: str, resource_name: str, command_id: str, **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + """Gets the results of a command which has been run on the Managed Cluster. + + Gets the results of a command which has been run on the Managed Cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param command_id: Id of the command. Required. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult or None or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + request = build_get_command_result_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + command_id=command_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_command_result.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + get_command_result.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}" + } + + @distributed_trace + def list_outbound_network_dependencies_endpoints( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncIterable["_models.OutboundEnvironmentEndpoint"]: + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. + + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpoint or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.OutboundEnvironmentEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.OutboundEnvironmentEndpointCollection] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_outbound_network_dependencies_endpoints.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OutboundEnvironmentEndpointCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_outbound_network_dependencies_endpoints.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_operations.py new file mode 100644 index 000000000000..4a2e16837e7a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_operations.py @@ -0,0 +1,141 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import build_list_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationValue"]: + """Gets a list of operations. + + Gets a list of operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationValue or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.OperationValue] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.ContainerService/operations"} diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..3f833db69e5b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,486 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_endpoint_connections_operations import ( + build_delete_request, + build_get_request, + build_list_request, + build_update_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnectionListResult: + """Gets a list of private endpoint connections in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnectionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the specified private endpoint connection. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, IO], + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateEndpointConnection") + + request = build_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..7c48f384ae89 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,124 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_link_resources_operations import build_list_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`private_link_resources` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResourcesListResult: + """Gets a list of private link resources in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResourcesListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.PrivateLinkResourcesListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResourcesListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 000000000000..6f1e1611c69c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,206 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._resolve_private_link_service_id_operations import build_post_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ResolvePrivateLinkServiceIdOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`resolve_private_link_service_id` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.PrivateLinkResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.PrivateLinkResource, IO], + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Is either + a PrivateLinkResource type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateLinkResource") + + request = build_post_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + post.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_snapshots_operations.py new file mode 100644 index 000000000000..a9b3644f998b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_snapshots_operations.py @@ -0,0 +1,662 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._snapshots_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_resource_group_request, + build_list_request, + build_update_tags_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class SnapshotsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`snapshots` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. + + Gets a list of snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots"} + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: + """Lists snapshots in the specified subscription and resource group. + + Lists snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots" + } + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: + """Gets a snapshot. + + Gets a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.Snapshot, IO], **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Snapshot") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update_tags.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """Deletes a snapshot. + + Deletes a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_role_bindings_operations.py new file mode 100644 index 000000000000..b5c5919d17d5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -0,0 +1,457 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._trusted_access_role_bindings_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_request, +) + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class TrustedAccessRoleBindingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`trusted_access_role_bindings` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncIterable["_models.TrustedAccessRoleBinding"]: + """List trusted access role bindings. + + List trusted access role bindings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TrustedAccessRoleBinding or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.TrustedAccessRoleBindingListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("TrustedAccessRoleBindingListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Get a trusted access role binding. + + Get a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("TrustedAccessRoleBinding", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + } + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _models.TrustedAccessRoleBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Create or update a trusted access role binding. + + Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Create or update a trusted access role binding. + + Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, IO], + **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Create or update a trusted access role binding. + + Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. + :type trusted_access_role_binding: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(trusted_access_role_binding, (IO, bytes)): + _content = trusted_access_role_binding + else: + _json = self._serialize.body(trusted_access_role_binding, "TrustedAccessRoleBinding") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("TrustedAccessRoleBinding", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + } + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> None: + """Delete a trusted access role binding. + + Delete a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_roles_operations.py new file mode 100644 index 000000000000..2452e67c9ecd --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/aio/operations/_trusted_access_roles_operations.py @@ -0,0 +1,147 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._trusted_access_roles_operations import build_list_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class TrustedAccessRolesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.aio.ContainerServiceClient`'s + :attr:`trusted_access_roles` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.TrustedAccessRole"]: + """List supported trusted access roles. + + List supported trusted access roles. + + :param location: The name of Azure region. Required. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TrustedAccessRole or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRole] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.TrustedAccessRoleListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("TrustedAccessRoleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/__init__.py new file mode 100644 index 000000000000..f592802fcc46 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/__init__.py @@ -0,0 +1,383 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._models_py3 import AbsoluteMonthlySchedule +from ._models_py3 import AgentPool +from ._models_py3 import AgentPoolAvailableVersions +from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem +from ._models_py3 import AgentPoolListResult +from ._models_py3 import AgentPoolNetworkProfile +from ._models_py3 import AgentPoolUpgradeProfile +from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem +from ._models_py3 import AgentPoolUpgradeSettings +from ._models_py3 import AgentPoolWindowsProfile +from ._models_py3 import AzureKeyVaultKms +from ._models_py3 import CloudErrorBody +from ._models_py3 import ClusterUpgradeSettings +from ._models_py3 import ContainerServiceDiagnosticsProfile +from ._models_py3 import ContainerServiceLinuxProfile +from ._models_py3 import ContainerServiceMasterProfile +from ._models_py3 import ContainerServiceNetworkProfile +from ._models_py3 import ContainerServiceNetworkProfileKubeProxyConfig +from ._models_py3 import ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig +from ._models_py3 import ContainerServiceSshConfiguration +from ._models_py3 import ContainerServiceSshPublicKey +from ._models_py3 import ContainerServiceVMDiagnostics +from ._models_py3 import CreationData +from ._models_py3 import CredentialResult +from ._models_py3 import CredentialResults +from ._models_py3 import DailySchedule +from ._models_py3 import DateSpan +from ._models_py3 import EndpointDependency +from ._models_py3 import EndpointDetail +from ._models_py3 import ExtendedLocation +from ._models_py3 import GuardrailsProfile +from ._models_py3 import IPTag +from ._models_py3 import KubeletConfig +from ._models_py3 import LinuxOSConfig +from ._models_py3 import MaintenanceConfiguration +from ._models_py3 import MaintenanceConfigurationListResult +from ._models_py3 import MaintenanceWindow +from ._models_py3 import ManagedCluster +from ._models_py3 import ManagedClusterAADProfile +from ._models_py3 import ManagedClusterAPIServerAccessProfile +from ._models_py3 import ManagedClusterAccessProfile +from ._models_py3 import ManagedClusterAddonProfile +from ._models_py3 import ManagedClusterAddonProfileIdentity +from ._models_py3 import ManagedClusterAgentPoolProfile +from ._models_py3 import ManagedClusterAgentPoolProfileProperties +from ._models_py3 import ManagedClusterAutoUpgradeProfile +from ._models_py3 import ManagedClusterAzureMonitorProfile +from ._models_py3 import ManagedClusterAzureMonitorProfileKubeStateMetrics +from ._models_py3 import ManagedClusterAzureMonitorProfileMetrics +from ._models_py3 import ManagedClusterHTTPProxyConfig +from ._models_py3 import ManagedClusterIdentity +from ._models_py3 import ManagedClusterIngressProfile +from ._models_py3 import ManagedClusterIngressProfileWebAppRouting +from ._models_py3 import ManagedClusterListResult +from ._models_py3 import ManagedClusterLoadBalancerProfile +from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs +from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes +from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs +from ._models_py3 import ManagedClusterManagedOutboundIPProfile +from ._models_py3 import ManagedClusterNATGatewayProfile +from ._models_py3 import ManagedClusterNodeResourceGroupProfile +from ._models_py3 import ManagedClusterOIDCIssuerProfile +from ._models_py3 import ManagedClusterPodIdentity +from ._models_py3 import ManagedClusterPodIdentityException +from ._models_py3 import ManagedClusterPodIdentityProfile +from ._models_py3 import ManagedClusterPodIdentityProvisioningError +from ._models_py3 import ManagedClusterPodIdentityProvisioningErrorBody +from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo +from ._models_py3 import ManagedClusterPoolUpgradeProfile +from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem +from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile +from ._models_py3 import ManagedClusterPropertiesForSnapshot +from ._models_py3 import ManagedClusterSKU +from ._models_py3 import ManagedClusterSecurityProfile +from ._models_py3 import ManagedClusterSecurityProfileDefender +from ._models_py3 import ManagedClusterSecurityProfileDefenderSecurityMonitoring +from ._models_py3 import ManagedClusterSecurityProfileImageCleaner +from ._models_py3 import ManagedClusterSecurityProfileNodeRestriction +from ._models_py3 import ManagedClusterSecurityProfileWorkloadIdentity +from ._models_py3 import ManagedClusterServicePrincipalProfile +from ._models_py3 import ManagedClusterSnapshot +from ._models_py3 import ManagedClusterSnapshotListResult +from ._models_py3 import ManagedClusterStorageProfile +from ._models_py3 import ManagedClusterStorageProfileBlobCSIDriver +from ._models_py3 import ManagedClusterStorageProfileDiskCSIDriver +from ._models_py3 import ManagedClusterStorageProfileFileCSIDriver +from ._models_py3 import ManagedClusterStorageProfileSnapshotController +from ._models_py3 import ManagedClusterUpgradeProfile +from ._models_py3 import ManagedClusterWindowsProfile +from ._models_py3 import ManagedClusterWorkloadAutoScalerProfile +from ._models_py3 import ManagedClusterWorkloadAutoScalerProfileKeda +from ._models_py3 import ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler +from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue +from ._models_py3 import NetworkProfileForSnapshot +from ._models_py3 import OSOptionProfile +from ._models_py3 import OSOptionProperty +from ._models_py3 import OperationListResult +from ._models_py3 import OperationValue +from ._models_py3 import OutboundEnvironmentEndpoint +from ._models_py3 import OutboundEnvironmentEndpointCollection +from ._models_py3 import PortRange +from ._models_py3 import PowerState +from ._models_py3 import PrivateEndpoint +from ._models_py3 import PrivateEndpointConnection +from ._models_py3 import PrivateEndpointConnectionListResult +from ._models_py3 import PrivateLinkResource +from ._models_py3 import PrivateLinkResourcesListResult +from ._models_py3 import PrivateLinkServiceConnectionState +from ._models_py3 import RelativeMonthlySchedule +from ._models_py3 import Resource +from ._models_py3 import ResourceReference +from ._models_py3 import RunCommandRequest +from ._models_py3 import RunCommandResult +from ._models_py3 import Schedule +from ._models_py3 import Snapshot +from ._models_py3 import SnapshotListResult +from ._models_py3 import SubResource +from ._models_py3 import SysctlConfig +from ._models_py3 import SystemData +from ._models_py3 import TagsObject +from ._models_py3 import TimeInWeek +from ._models_py3 import TimeSpan +from ._models_py3 import TrackedResource +from ._models_py3 import TrustedAccessRole +from ._models_py3 import TrustedAccessRoleBinding +from ._models_py3 import TrustedAccessRoleBindingListResult +from ._models_py3 import TrustedAccessRoleListResult +from ._models_py3 import TrustedAccessRoleRule +from ._models_py3 import UpgradeOverrideSettings +from ._models_py3 import UserAssignedIdentity +from ._models_py3 import WeeklySchedule +from ._models_py3 import WindowsGmsaProfile + +from ._container_service_client_enums import AgentPoolMode +from ._container_service_client_enums import AgentPoolType +from ._container_service_client_enums import BackendPoolType +from ._container_service_client_enums import Code +from ._container_service_client_enums import ConnectionStatus +from ._container_service_client_enums import ContainerServiceStorageProfileTypes +from ._container_service_client_enums import ContainerServiceVMSizeTypes +from ._container_service_client_enums import ControlPlaneUpgradeOverride +from ._container_service_client_enums import ControlledValues +from ._container_service_client_enums import Count +from ._container_service_client_enums import CreatedByType +from ._container_service_client_enums import EbpfDataplane +from ._container_service_client_enums import Expander +from ._container_service_client_enums import ExtendedLocationTypes +from ._container_service_client_enums import Format +from ._container_service_client_enums import GPUInstanceProfile +from ._container_service_client_enums import IpFamily +from ._container_service_client_enums import IpvsScheduler +from ._container_service_client_enums import KeyVaultNetworkAccessTypes +from ._container_service_client_enums import KubeletDiskType +from ._container_service_client_enums import Level +from ._container_service_client_enums import LicenseType +from ._container_service_client_enums import LoadBalancerSku +from ._container_service_client_enums import ManagedClusterPodIdentityProvisioningState +from ._container_service_client_enums import ManagedClusterSKUName +from ._container_service_client_enums import ManagedClusterSKUTier +from ._container_service_client_enums import Mode +from ._container_service_client_enums import NetworkMode +from ._container_service_client_enums import NetworkPlugin +from ._container_service_client_enums import NetworkPluginMode +from ._container_service_client_enums import NetworkPolicy +from ._container_service_client_enums import NodeOSUpgradeChannel +from ._container_service_client_enums import OSDiskType +from ._container_service_client_enums import OSSKU +from ._container_service_client_enums import OSType +from ._container_service_client_enums import OutboundType +from ._container_service_client_enums import PrivateEndpointConnectionProvisioningState +from ._container_service_client_enums import Protocol +from ._container_service_client_enums import PublicNetworkAccess +from ._container_service_client_enums import ResourceIdentityType +from ._container_service_client_enums import RestrictionLevel +from ._container_service_client_enums import ScaleDownMode +from ._container_service_client_enums import ScaleSetEvictionPolicy +from ._container_service_client_enums import ScaleSetPriority +from ._container_service_client_enums import SnapshotType +from ._container_service_client_enums import TrustedAccessRoleBindingProvisioningState +from ._container_service_client_enums import Type +from ._container_service_client_enums import UpdateMode +from ._container_service_client_enums import UpgradeChannel +from ._container_service_client_enums import WeekDay +from ._container_service_client_enums import WorkloadRuntime +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "AbsoluteMonthlySchedule", + "AgentPool", + "AgentPoolAvailableVersions", + "AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", + "AgentPoolListResult", + "AgentPoolNetworkProfile", + "AgentPoolUpgradeProfile", + "AgentPoolUpgradeProfilePropertiesUpgradesItem", + "AgentPoolUpgradeSettings", + "AgentPoolWindowsProfile", + "AzureKeyVaultKms", + "CloudErrorBody", + "ClusterUpgradeSettings", + "ContainerServiceDiagnosticsProfile", + "ContainerServiceLinuxProfile", + "ContainerServiceMasterProfile", + "ContainerServiceNetworkProfile", + "ContainerServiceNetworkProfileKubeProxyConfig", + "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", + "ContainerServiceSshConfiguration", + "ContainerServiceSshPublicKey", + "ContainerServiceVMDiagnostics", + "CreationData", + "CredentialResult", + "CredentialResults", + "DailySchedule", + "DateSpan", + "EndpointDependency", + "EndpointDetail", + "ExtendedLocation", + "GuardrailsProfile", + "IPTag", + "KubeletConfig", + "LinuxOSConfig", + "MaintenanceConfiguration", + "MaintenanceConfigurationListResult", + "MaintenanceWindow", + "ManagedCluster", + "ManagedClusterAADProfile", + "ManagedClusterAPIServerAccessProfile", + "ManagedClusterAccessProfile", + "ManagedClusterAddonProfile", + "ManagedClusterAddonProfileIdentity", + "ManagedClusterAgentPoolProfile", + "ManagedClusterAgentPoolProfileProperties", + "ManagedClusterAutoUpgradeProfile", + "ManagedClusterAzureMonitorProfile", + "ManagedClusterAzureMonitorProfileKubeStateMetrics", + "ManagedClusterAzureMonitorProfileMetrics", + "ManagedClusterHTTPProxyConfig", + "ManagedClusterIdentity", + "ManagedClusterIngressProfile", + "ManagedClusterIngressProfileWebAppRouting", + "ManagedClusterListResult", + "ManagedClusterLoadBalancerProfile", + "ManagedClusterLoadBalancerProfileManagedOutboundIPs", + "ManagedClusterLoadBalancerProfileOutboundIPPrefixes", + "ManagedClusterLoadBalancerProfileOutboundIPs", + "ManagedClusterManagedOutboundIPProfile", + "ManagedClusterNATGatewayProfile", + "ManagedClusterNodeResourceGroupProfile", + "ManagedClusterOIDCIssuerProfile", + "ManagedClusterPodIdentity", + "ManagedClusterPodIdentityException", + "ManagedClusterPodIdentityProfile", + "ManagedClusterPodIdentityProvisioningError", + "ManagedClusterPodIdentityProvisioningErrorBody", + "ManagedClusterPodIdentityProvisioningInfo", + "ManagedClusterPoolUpgradeProfile", + "ManagedClusterPoolUpgradeProfileUpgradesItem", + "ManagedClusterPropertiesAutoScalerProfile", + "ManagedClusterPropertiesForSnapshot", + "ManagedClusterSKU", + "ManagedClusterSecurityProfile", + "ManagedClusterSecurityProfileDefender", + "ManagedClusterSecurityProfileDefenderSecurityMonitoring", + "ManagedClusterSecurityProfileImageCleaner", + "ManagedClusterSecurityProfileNodeRestriction", + "ManagedClusterSecurityProfileWorkloadIdentity", + "ManagedClusterServicePrincipalProfile", + "ManagedClusterSnapshot", + "ManagedClusterSnapshotListResult", + "ManagedClusterStorageProfile", + "ManagedClusterStorageProfileBlobCSIDriver", + "ManagedClusterStorageProfileDiskCSIDriver", + "ManagedClusterStorageProfileFileCSIDriver", + "ManagedClusterStorageProfileSnapshotController", + "ManagedClusterUpgradeProfile", + "ManagedClusterWindowsProfile", + "ManagedClusterWorkloadAutoScalerProfile", + "ManagedClusterWorkloadAutoScalerProfileKeda", + "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler", + "ManagedServiceIdentityUserAssignedIdentitiesValue", + "NetworkProfileForSnapshot", + "OSOptionProfile", + "OSOptionProperty", + "OperationListResult", + "OperationValue", + "OutboundEnvironmentEndpoint", + "OutboundEnvironmentEndpointCollection", + "PortRange", + "PowerState", + "PrivateEndpoint", + "PrivateEndpointConnection", + "PrivateEndpointConnectionListResult", + "PrivateLinkResource", + "PrivateLinkResourcesListResult", + "PrivateLinkServiceConnectionState", + "RelativeMonthlySchedule", + "Resource", + "ResourceReference", + "RunCommandRequest", + "RunCommandResult", + "Schedule", + "Snapshot", + "SnapshotListResult", + "SubResource", + "SysctlConfig", + "SystemData", + "TagsObject", + "TimeInWeek", + "TimeSpan", + "TrackedResource", + "TrustedAccessRole", + "TrustedAccessRoleBinding", + "TrustedAccessRoleBindingListResult", + "TrustedAccessRoleListResult", + "TrustedAccessRoleRule", + "UpgradeOverrideSettings", + "UserAssignedIdentity", + "WeeklySchedule", + "WindowsGmsaProfile", + "AgentPoolMode", + "AgentPoolType", + "BackendPoolType", + "Code", + "ConnectionStatus", + "ContainerServiceStorageProfileTypes", + "ContainerServiceVMSizeTypes", + "ControlPlaneUpgradeOverride", + "ControlledValues", + "Count", + "CreatedByType", + "EbpfDataplane", + "Expander", + "ExtendedLocationTypes", + "Format", + "GPUInstanceProfile", + "IpFamily", + "IpvsScheduler", + "KeyVaultNetworkAccessTypes", + "KubeletDiskType", + "Level", + "LicenseType", + "LoadBalancerSku", + "ManagedClusterPodIdentityProvisioningState", + "ManagedClusterSKUName", + "ManagedClusterSKUTier", + "Mode", + "NetworkMode", + "NetworkPlugin", + "NetworkPluginMode", + "NetworkPolicy", + "NodeOSUpgradeChannel", + "OSDiskType", + "OSSKU", + "OSType", + "OutboundType", + "PrivateEndpointConnectionProvisioningState", + "Protocol", + "PublicNetworkAccess", + "ResourceIdentityType", + "RestrictionLevel", + "ScaleDownMode", + "ScaleSetEvictionPolicy", + "ScaleSetPriority", + "SnapshotType", + "TrustedAccessRoleBindingProvisioningState", + "Type", + "UpdateMode", + "UpgradeChannel", + "WeekDay", + "WorkloadRuntime", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_container_service_client_enums.py new file mode 100644 index 000000000000..9582ee74e5d7 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_container_service_client_enums.py @@ -0,0 +1,802 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """A cluster must have at least one 'System' Agent Pool at all times. For additional information + on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. + """ + + SYSTEM = "System" + """System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory.""" + USER = "User" + """User agent pools are primarily for hosting your application pods.""" + + +class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of Agent Pool.""" + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + """Create an Agent Pool backed by a Virtual Machine Scale Set.""" + AVAILABILITY_SET = "AvailabilitySet" + """Use of this is strongly discouraged.""" + + +class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the managed inbound Load Balancer BackendPool.""" + + NODE_IP_CONFIGURATION = "NodeIPConfiguration" + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" + NODE_IP = "NodeIP" + """The type of the managed inbound Load Balancer BackendPool. + #: https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" + + +class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Tells whether the cluster is Running or Stopped.""" + + RUNNING = "Running" + """The cluster is running.""" + STOPPED = "Stopped" + """The cluster is stopped.""" + + +class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The private link service connection status.""" + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + + +class ContainerServiceStorageProfileTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies what kind of storage to use. If omitted, the default will be chosen on your behalf + based on the choice of orchestrator. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + + +class ContainerServiceVMSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Size of agent VMs. Note: This is no longer maintained.""" + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + + +class ControlledValues(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Controls which resource value autoscaler will change. Default value is RequestsAndLimits.""" + + REQUESTS_AND_LIMITS = "RequestsAndLimits" + """Autoscaler will control resource requests and limits.""" + REQUESTS_ONLY = "RequestsOnly" + """Autoscaler will control resource requests only.""" + + +class ControlPlaneUpgradeOverride(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The list of control plane upgrade override settings.""" + + IGNORE_KUBERNETES_DEPRECATIONS = "IgnoreKubernetesDeprecations" + """Upgrade the cluster control plane version without checking for recent Kubernetes deprecations + #: usage.""" + + +class Count(int, Enum, metaclass=CaseInsensitiveEnumMeta): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource.""" + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + + +class EbpfDataplane(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The eBPF dataplane used for building the Kubernetes network.""" + + CILIUM = "cilium" + """Use Cilium for networking in the Kubernetes cluster.""" + + +class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """If not specified, the default is 'random'. See `expanders + `_ + for more information. + """ + + LEAST_WASTE = "least-waste" + """Selects the node group that will have the least idle CPU (if tied, unused memory) after + #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or + #: high memory nodes, and only want to expand those when there are pending pods that need a lot of + #: those resources.""" + MOST_PODS = "most-pods" + """Selects the node group that would be able to schedule the most pods when scaling up. This is + #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note + #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple + #: smaller nodes at once.""" + PRIORITY = "priority" + """Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_.""" + RANDOM = "random" + """Used when you don't have a particular need for the node groups to scale differently.""" + + +class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of extendedLocation.""" + + EDGE_ZONE = "EdgeZone" + + +class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Format.""" + + AZURE = "azure" + """Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully + #: removed in v1.26. See: https://aka.ms/k8s/changes-1-26.""" + EXEC = "exec" + """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" + + +class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.""" + + MIG1_G = "MIG1g" + MIG2_G = "MIG2g" + MIG3_G = "MIG3g" + MIG4_G = "MIG4g" + MIG7_G = "MIG7g" + + +class IpFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The IP version to use for cluster networking and IP assignment.""" + + I_PV4 = "IPv4" + I_PV6 = "IPv6" + + +class IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """IPVS scheduler, for more information please see + http://www.linuxvirtualserver.org/docs/scheduling.html. + """ + + ROUND_ROBIN = "RoundRobin" + """Round Robin""" + LEAST_CONNECTION = "LeastConnection" + """Least Connection""" + + +class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network access of key vault. The possible values are ``Public`` and ``Private``. ``Public`` + means the key vault allows public access from all networks. ``Private`` means the key vault + disables public access and enables private link. The default value is ``Public``. + """ + + PUBLIC = "Public" + PRIVATE = "Private" + + +class KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Determines the placement of emptyDir volumes, container runtime data root, and Kubelet + ephemeral storage. + """ + + OS = "OS" + """Kubelet will use the OS disk for its data.""" + TEMPORARY = "Temporary" + """Kubelet will use the temporary disk for its data.""" + + +class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The guardrails level to be used. By default, Guardrails is enabled for all namespaces except + those that AKS excludes via systemExcludedNamespaces. + """ + + OFF = "Off" + WARNING = "Warning" + ENFORCEMENT = "Enforcement" + + +class LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. + """ + + NONE = "None" + """No additional licensing is applied.""" + WINDOWS_SERVER = "Windows_Server" + """Enables Azure Hybrid User Benefits for Windows VMs.""" + + +class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. + """ + + STANDARD = "standard" + """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article.""" + BASIC = "basic" + """Use a basic Load Balancer with limited functionality.""" + + +class ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state of the pod identity.""" + + ASSIGNED = "Assigned" + CANCELED = "Canceled" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + +class ManagedClusterSKUName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The name of a managed cluster SKU.""" + + BASIC = "Basic" + """Basic will be removed in 07/01/2023 API version. Base will replace Basic, please switch to + #: Base.""" + BASE = "Base" + """Base option for the AKS control plane.""" + + +class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """If not specified, the default is 'Free'. See `AKS Pricing Tier + `_ for more details. + """ + + PAID = "Paid" + """Paid tier will be removed in 07/01/2023 API version. Standard tier will replace Paid tier, + #: please switch to Standard tier.""" + STANDARD = "Standard" + """Recommended for mission-critical and production workloads. Includes Kubernetes control plane + #: autoscaling, workload-intensive testing, and up to 5,000 nodes per cluster. Guarantees 99.95% + #: availability of the Kubernetes API server endpoint for clusters that use Availability Zones and + #: 99.9% of availability for clusters that don't use Availability Zones.""" + FREE = "Free" + """The cluster management is free, but charged for VM, storage, and networking usage. Best for + #: experimenting, learning, simple testing, or workloads with fewer than 10 nodes. Not recommended + #: for production use cases.""" + + +class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify which proxy mode to use ('IPTABLES' or 'IPVS').""" + + IPTABLES = "IPTABLES" + """IPTables proxy mode""" + IPVS = "IPVS" + """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" + + +class NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This cannot be specified if networkPlugin is anything other than 'azure'.""" + + TRANSPARENT = "transparent" + """No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information.""" + BRIDGE = "bridge" + """This is no longer supported""" + + +class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network plugin used for building the Kubernetes network.""" + + AZURE = "azure" + """Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information.""" + KUBENET = "kubenet" + """Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information.""" + NONE = "none" + """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for + #: networking functionality.""" + + +class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The mode the network plugin should use.""" + + OVERLAY = "Overlay" + """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + #: Kubenet reference plugins host-local and bridge.""" + + +class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network policy used for building the Kubernetes network.""" + + CALICO = "calico" + """Use Calico network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" + AZURE = "azure" + """Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information.""" + + +class NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA.""" + + NONE = "None" + """No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means + #: you are responsible for your security updates""" + UNMANAGED = "Unmanaged" + """OS updates will be applied automatically through the OS built-in patching infrastructure. Newly + #: scaled in machines will be unpatched initially, and will be patched at some later time by the + #: OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner + #: apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows + #: does not apply security patches automatically and so for them this option is equivalent to None + #: till further notice""" + SECURITY_PATCH = "SecurityPatch" + """AKS will update the nodes VHD with patches from the image maintainer labelled "security only" + #: on a regular basis. Where possible, patches will also be applied without reimaging to existing + #: nodes. Some patches, such as kernel patches, cannot be applied to existing nodes without + #: disruption. For such patches, the VHD will be updated, and machines will be rolling reimaged to + #: that VHD following maintenance windows and surge settings. This option incurs the extra cost of + #: hosting the VHDs in your node resource group.""" + NODE_IMAGE = "NodeImage" + """AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a + #: weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following + #: maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option + #: as AKS hosts the images.""" + + +class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested + OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more + information see `Ephemeral OS + `_. + """ + + MANAGED = "Managed" + """Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + #: loss should the VM need to be relocated to another host. Since containers aren't designed to + #: have local state persisted, this behavior offers limited value while providing some drawbacks, + #: including slower node provisioning and higher read/write latency.""" + EPHEMERAL = "Ephemeral" + """Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades.""" + + +class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to + Windows2022 after Windows2019 is deprecated. + """ + + UBUNTU = "Ubuntu" + CBL_MARINER = "CBLMariner" + MARINER = "Mariner" + WINDOWS2019 = "Windows2019" + WINDOWS2022 = "Windows2022" + + +class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The operating system type. The default is Linux.""" + + LINUX = "Linux" + """Use Linux.""" + WINDOWS = "Windows" + """Use Windows.""" + + +class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This can only be set at cluster creation time and cannot be changed later. For more information + see `egress outbound type `_. + """ + + LOAD_BALANCER = "loadBalancer" + """The load balancer is used for egress through an AKS assigned public IP. This supports + #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type + #: loadbalancer + #: `_.""" + USER_DEFINED_ROUTING = "userDefinedRouting" + """Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_.""" + MANAGED_NAT_GATEWAY = "managedNATGateway" + """The AKS-managed NAT gateway is used for egress.""" + USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + """The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration.""" + + +class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state.""" + + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + +class Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The network protocol of the port.""" + + TCP = "TCP" + """TCP protocol.""" + UDP = "UDP" + """UDP protocol.""" + + +class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Allow or deny public network access for AKS.""" + + ENABLED = "Enabled" + """Inbound/Outbound to the managedCluster is allowed.""" + DISABLED = "Disabled" + """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" + SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" + + +class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """For more information see `use managed identities in AKS + `_. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + """Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources.""" + USER_ASSIGNED = "UserAssigned" + """Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources.""" + NONE = "None" + """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" + + +class RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The restriction level applied to the cluster's node resource group.""" + + UNRESTRICTED = "Unrestricted" + """All RBAC permissions are allowed on the managed node resource group""" + READ_ONLY = "ReadOnly" + """Only */read RBAC permissions allowed on the managed node resource group""" + + +class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes how VMs are added to or removed from Agent Pools. See `billing states + `_. + """ + + DELETE = "Delete" + """Create new instances during scale up and remove instances during scale down.""" + DEALLOCATE = "Deallocate" + """Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down.""" + + +class ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. + For more information about eviction see `spot VMs + `_. + """ + + DELETE = "Delete" + """Nodes in the underlying Scale Set of the node pool are deleted when they're evicted.""" + DEALLOCATE = "Deallocate" + """Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading.""" + + +class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The Virtual Machine Scale Set priority.""" + + SPOT = "Spot" + """Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information.""" + REGULAR = "Regular" + """Regular VMs will be used.""" + + +class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of a snapshot. The default is NodePool.""" + + NODE_POOL = "NodePool" + """The snapshot is a snapshot of a node pool.""" + MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" + + +class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state of trusted access role binding.""" + + CANCELED = "Canceled" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + +class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs.""" + + FIRST = "First" + """First.""" + SECOND = "Second" + """Second.""" + THIRD = "Third" + """Third.""" + FOURTH = "Fourth" + """Fourth.""" + LAST = "Last" + """Last.""" + + +class UpdateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Each update mode level is a superset of the lower levels. Off`_. + """ + + RAPID = "rapid" + """Automatically upgrade the cluster to the latest supported patch release on the latest supported + #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor + #: version where N is the latest supported minor version, the cluster first upgrades to the latest + #: supported patch version on N-1 minor version. For example, if a cluster is running version + #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is + #: upgraded to 1.18.6, then is upgraded to 1.19.1.""" + STABLE = "stable" + """Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: where N is the latest supported minor version. For example, if a cluster is running version + #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded + #: to 1.18.6.""" + PATCH = "patch" + """Automatically upgrade the cluster to the latest supported patch version when it becomes + #: available while keeping the minor version the same. For example, if a cluster is running + #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is + #: upgraded to 1.17.9.""" + NODE_IMAGE = "node-image" + """Automatically upgrade the node image to the latest version available. Consider using + #: nodeOSUpgradeChannel instead as that allows you to configure node OS patching separate from + #: Kubernetes version patching""" + NONE = "none" + """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" + + +class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The weekday enum.""" + + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" + + +class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Determines the type of workload a node can run.""" + + OCI_CONTAINER = "OCIContainer" + """Nodes will use Kubelet to run standard OCI container workloads.""" + WASM_WASI = "WasmWasi" + """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" + KATA_MSHV_VM_ISOLATION = "KataMshvVmIsolation" + """Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due + #: to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can + #: only be used with VM series that support Nested Virtualization such as Dv3 series.""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_models_py3.py new file mode 100644 index 000000000000..32468c77689e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_models_py3.py @@ -0,0 +1,8068 @@ +# coding=utf-8 +# pylint: disable=too-many-lines +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union + +from ... import _serialization + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from .. import models as _models + + +class AbsoluteMonthlySchedule(_serialization.Model): + """For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + + All required parameters must be populated in order to send to Azure. + + :ivar interval_months: Specifies the number of months between each set of occurrences. + Required. + :vartype interval_months: int + :ivar day_of_month: The date of the month. Required. + :vartype day_of_month: int + """ + + _validation = { + "interval_months": {"required": True, "maximum": 6, "minimum": 1}, + "day_of_month": {"required": True, "maximum": 31, "minimum": 1}, + } + + _attribute_map = { + "interval_months": {"key": "intervalMonths", "type": "int"}, + "day_of_month": {"key": "dayOfMonth", "type": "int"}, + } + + def __init__(self, *, interval_months: int, day_of_month: int, **kwargs: Any) -> None: + """ + :keyword interval_months: Specifies the number of months between each set of occurrences. + Required. + :paramtype interval_months: int + :keyword day_of_month: The date of the month. Required. + :paramtype day_of_month: int + """ + super().__init__(**kwargs) + self.interval_months = interval_months + self.day_of_month = day_of_month + + +class SubResource(_serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): # pylint: disable=too-many-instance-attributes + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :vartype count: int + :ivar vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :vartype vm_size: str + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :vartype os_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSDiskType + :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletDiskType + :ivar workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". + :vartype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WorkloadRuntime + :ivar message_of_the_day: A base64-encoded string which will be written to /etc/motd after + decoding. This allows customization of the message of the day for Linux nodes. It must not be + specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be + executed as a script). + :vartype message_of_the_day: str + :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnet_subnet_id: str + :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype pod_subnet_id: str + :ivar max_pods: The maximum number of pods that can run on a node. + :vartype max_pods: int + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "CBLMariner", "Mariner", "Windows2019", and "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSSKU + :ivar max_count: The maximum number of nodes for auto-scaling. + :vartype max_count: int + :ivar min_count: The minimum number of nodes for auto-scaling. + :vartype min_count: int + :ivar enable_auto_scaling: Whether to enable auto-scaler. + :vartype enable_auto_scaling: bool + :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Known values are: "Delete" and "Deallocate". + :vartype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleDownMode + :ivar type_properties_type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" + and "AvailabilitySet". + :vartype type_properties_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolType + :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :vartype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolMode + :ivar orchestrator_version: Both patch version and are + supported. When is specified, the latest supported patch version is chosen + automatically. Updating the agent pool with the same once it has been created + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool + `_. + :vartype orchestrator_version: str + :ivar current_orchestrator_version: If orchestratorVersion was a fully specified version + , this field will be exactly equal to it. If orchestratorVersion was + , this field will contain the full version being used. + :vartype current_orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar upgrade_settings: Settings for upgrading the agentpool. + :vartype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PowerState + :ivar availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :vartype availability_zones: list[str] + :ivar enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :vartype enable_node_public_ip: bool + :ivar enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that + the feature is enabled and deploys a daemonset along with host services to sync custom + certificate authorities from user-provided list of base64 encoded certificates into node trust + stores. Defaults to false. + :vartype enable_custom_ca_trust: bool + :ivar node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype node_public_ip_prefix_id: str + :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default + is 'Regular'. Known values are: "Spot" and "Regular". + :vartype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetPriority + :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :vartype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetEvictionPolicy + :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :vartype spot_max_price: float + :ivar tags: The tags to be persisted on the agent pool virtual machine scale set. + :vartype tags: dict[str, str] + :ivar node_labels: The node labels to be persisted across all nodes in agent pool. + :vartype node_labels: dict[str, str] + :ivar node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :vartype node_taints: list[str] + :ivar proximity_placement_group_id: The ID for Proximity Placement Group. + :vartype proximity_placement_group_id: str + :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. + :vartype kubelet_config: ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletConfig + :ivar linux_os_config: The OS configuration of Linux agent nodes. + :vartype linux_os_config: ~azure.mgmt.containerservice.v2023_01_02_preview.models.LinuxOSConfig + :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :vartype enable_encryption_at_host: bool + :ivar enable_ultra_ssd: Whether to enable UltraSSD. + :vartype enable_ultra_ssd: bool + :ivar enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :vartype enable_fips: bool + :ivar gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GPUInstanceProfile + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :ivar capacity_reservation_group_id: AKS will associate the specified agent pool with the + Capacity Reservation Group. + :vartype capacity_reservation_group_id: str + :ivar host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :vartype host_group_id: str + :ivar windows_profile: The Windows agent pool's specific profile. + :vartype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolWindowsProfile + :ivar network_profile: Network-related settings of an agent pool. + :vartype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolNetworkProfile + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "count": {"key": "properties.count", "type": "int"}, + "vm_size": {"key": "properties.vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "properties.osDiskSizeGB", "type": "int"}, + "os_disk_type": {"key": "properties.osDiskType", "type": "str"}, + "kubelet_disk_type": {"key": "properties.kubeletDiskType", "type": "str"}, + "workload_runtime": {"key": "properties.workloadRuntime", "type": "str"}, + "message_of_the_day": {"key": "properties.messageOfTheDay", "type": "str"}, + "vnet_subnet_id": {"key": "properties.vnetSubnetID", "type": "str"}, + "pod_subnet_id": {"key": "properties.podSubnetID", "type": "str"}, + "max_pods": {"key": "properties.maxPods", "type": "int"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "os_sku": {"key": "properties.osSKU", "type": "str"}, + "max_count": {"key": "properties.maxCount", "type": "int"}, + "min_count": {"key": "properties.minCount", "type": "int"}, + "enable_auto_scaling": {"key": "properties.enableAutoScaling", "type": "bool"}, + "scale_down_mode": {"key": "properties.scaleDownMode", "type": "str"}, + "type_properties_type": {"key": "properties.type", "type": "str"}, + "mode": {"key": "properties.mode", "type": "str"}, + "orchestrator_version": {"key": "properties.orchestratorVersion", "type": "str"}, + "current_orchestrator_version": {"key": "properties.currentOrchestratorVersion", "type": "str"}, + "node_image_version": {"key": "properties.nodeImageVersion", "type": "str"}, + "upgrade_settings": {"key": "properties.upgradeSettings", "type": "AgentPoolUpgradeSettings"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "power_state": {"key": "properties.powerState", "type": "PowerState"}, + "availability_zones": {"key": "properties.availabilityZones", "type": "[str]"}, + "enable_node_public_ip": {"key": "properties.enableNodePublicIP", "type": "bool"}, + "enable_custom_ca_trust": {"key": "properties.enableCustomCATrust", "type": "bool"}, + "node_public_ip_prefix_id": {"key": "properties.nodePublicIPPrefixID", "type": "str"}, + "scale_set_priority": {"key": "properties.scaleSetPriority", "type": "str"}, + "scale_set_eviction_policy": {"key": "properties.scaleSetEvictionPolicy", "type": "str"}, + "spot_max_price": {"key": "properties.spotMaxPrice", "type": "float"}, + "tags": {"key": "properties.tags", "type": "{str}"}, + "node_labels": {"key": "properties.nodeLabels", "type": "{str}"}, + "node_taints": {"key": "properties.nodeTaints", "type": "[str]"}, + "proximity_placement_group_id": {"key": "properties.proximityPlacementGroupID", "type": "str"}, + "kubelet_config": {"key": "properties.kubeletConfig", "type": "KubeletConfig"}, + "linux_os_config": {"key": "properties.linuxOSConfig", "type": "LinuxOSConfig"}, + "enable_encryption_at_host": {"key": "properties.enableEncryptionAtHost", "type": "bool"}, + "enable_ultra_ssd": {"key": "properties.enableUltraSSD", "type": "bool"}, + "enable_fips": {"key": "properties.enableFIPS", "type": "bool"}, + "gpu_instance_profile": {"key": "properties.gpuInstanceProfile", "type": "str"}, + "creation_data": {"key": "properties.creationData", "type": "CreationData"}, + "capacity_reservation_group_id": {"key": "properties.capacityReservationGroupID", "type": "str"}, + "host_group_id": {"key": "properties.hostGroupID", "type": "str"}, + "windows_profile": {"key": "properties.windowsProfile", "type": "AgentPoolWindowsProfile"}, + "network_profile": {"key": "properties.networkProfile", "type": "AgentPoolNetworkProfile"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, + message_of_the_day: Optional[str] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Union[str, "_models.OSType"] = "Linux", + os_sku: Optional[Union[str, "_models.OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "_models.ScaleDownMode"]] = None, + type_properties_type: Optional[Union[str, "_models.AgentPoolType"]] = None, + mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + power_state: Optional["_models.PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + enable_custom_ca_trust: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", + scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", + spot_max_price: float = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["_models.KubeletConfig"] = None, + linux_os_config: Optional["_models.LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, + creation_data: Optional["_models.CreationData"] = None, + capacity_reservation_group_id: Optional[str] = None, + host_group_id: Optional[str] = None, + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, + network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :paramtype count: int + :keyword vm_size: VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :paramtype vm_size: str + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :paramtype os_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSDiskType + :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime + data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :paramtype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletDiskType + :keyword workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". + :paramtype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WorkloadRuntime + :keyword message_of_the_day: A base64-encoded string which will be written to /etc/motd after + decoding. This allows customization of the message of the day for Linux nodes. It must not be + specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be + executed as a script). + :paramtype message_of_the_day: str + :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and + used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to + just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype vnet_subnet_id: str + :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype pod_subnet_id: str + :keyword max_pods: The maximum number of pods that can run on a node. + :paramtype max_pods: int + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "CBLMariner", "Mariner", "Windows2019", and "Windows2022". + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSSKU + :keyword max_count: The maximum number of nodes for auto-scaling. + :paramtype max_count: int + :keyword min_count: The minimum number of nodes for auto-scaling. + :paramtype min_count: int + :keyword enable_auto_scaling: Whether to enable auto-scaler. + :paramtype enable_auto_scaling: bool + :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, + it defaults to Delete. Known values are: "Delete" and "Deallocate". + :paramtype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleDownMode + :keyword type_properties_type: The type of Agent Pool. Known values are: + "VirtualMachineScaleSets" and "AvailabilitySet". + :paramtype type_properties_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolType + :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For + additional information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :paramtype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolMode + :keyword orchestrator_version: Both patch version and are + supported. When is specified, the latest supported patch version is chosen + automatically. Updating the agent pool with the same once it has been created + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool + `_. + :paramtype orchestrator_version: str + :keyword upgrade_settings: Settings for upgrading the agentpool. + :paramtype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeSettings + :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent + Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs + and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :paramtype power_state: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PowerState + :keyword availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :paramtype availability_zones: list[str] + :keyword enable_node_public_ip: Some scenarios may require nodes in a node pool to receive + their own dedicated public IP addresses. A common scenario is for gaming workloads, where a + console needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :paramtype enable_node_public_ip: bool + :keyword enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that + the feature is enabled and deploys a daemonset along with host services to sync custom + certificate authorities from user-provided list of base64 encoded certificates into node trust + stores. Defaults to false. + :paramtype enable_custom_ca_trust: bool + :keyword node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :paramtype node_public_ip_prefix_id: str + :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Known values are: "Spot" and "Regular". + :paramtype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetPriority + :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :paramtype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetEvictionPolicy + :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :paramtype spot_max_price: float + :keyword tags: The tags to be persisted on the agent pool virtual machine scale set. + :paramtype tags: dict[str, str] + :keyword node_labels: The node labels to be persisted across all nodes in agent pool. + :paramtype node_labels: dict[str, str] + :keyword node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :paramtype node_taints: list[str] + :keyword proximity_placement_group_id: The ID for Proximity Placement Group. + :paramtype proximity_placement_group_id: str + :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. + :paramtype kubelet_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletConfig + :keyword linux_os_config: The OS configuration of Linux agent nodes. + :paramtype linux_os_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LinuxOSConfig + :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :paramtype enable_encryption_at_host: bool + :keyword enable_ultra_ssd: Whether to enable UltraSSD. + :paramtype enable_ultra_ssd: bool + :keyword enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :paramtype enable_fips: bool + :keyword gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance + profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and + "MIG7g". + :paramtype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GPUInstanceProfile + :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :keyword capacity_reservation_group_id: AKS will associate the specified agent pool with the + Capacity Reservation Group. + :paramtype capacity_reservation_group_id: str + :keyword host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :paramtype host_group_id: str + :keyword windows_profile: The Windows agent pool's specific profile. + :paramtype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolWindowsProfile + :keyword network_profile: Network-related settings of an agent pool. + :paramtype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolNetworkProfile + """ + super().__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.kubelet_disk_type = kubelet_disk_type + self.workload_runtime = workload_runtime + self.message_of_the_day = message_of_the_day + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.os_sku = os_sku + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.scale_down_mode = scale_down_mode + self.type_properties_type = type_properties_type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.current_orchestrator_version = None + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = power_state + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.enable_custom_ca_trust = enable_custom_ca_trust + self.node_public_ip_prefix_id = node_public_ip_prefix_id + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + self.enable_encryption_at_host = enable_encryption_at_host + self.enable_ultra_ssd = enable_ultra_ssd + self.enable_fips = enable_fips + self.gpu_instance_profile = gpu_instance_profile + self.creation_data = creation_data + self.capacity_reservation_group_id = capacity_reservation_group_id + self.host_group_id = host_group_id + self.windows_profile = windows_profile + self.network_profile = network_profile + + +class AgentPoolAvailableVersions(_serialization.Model): + """The list of available versions for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the agent pool version list. + :vartype id: str + :ivar name: The name of the agent pool version list. + :vartype name: str + :ivar type: Type of the agent pool version list. + :vartype type: str + :ivar agent_pool_versions: List of versions available for agent pool. + :vartype agent_pool_versions: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "agent_pool_versions": { + "key": "properties.agentPoolVersions", + "type": "[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]", + }, + } + + def __init__( + self, + *, + agent_pool_versions: Optional[List["_models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword agent_pool_versions: List of versions available for agent pool. + :paramtype agent_pool_versions: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.agent_pool_versions = agent_pool_versions + + +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(_serialization.Model): + """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + + :ivar default: Whether this version is the default agent pool version. + :vartype default: bool + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). + :vartype kubernetes_version: str + :ivar is_preview: Whether Kubernetes version is currently in preview. + :vartype is_preview: bool + """ + + _attribute_map = { + "default": {"key": "default", "type": "bool"}, + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "is_preview": {"key": "isPreview", "type": "bool"}, + } + + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword default: Whether this version is the default agent pool version. + :paramtype default: bool + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). + :paramtype kubernetes_version: str + :keyword is_preview: Whether Kubernetes version is currently in preview. + :paramtype is_preview: bool + """ + super().__init__(**kwargs) + self.default = default + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolListResult(_serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of agent pools. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[AgentPool]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of agent pools. + :paramtype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolNetworkProfile(_serialization.Model): + """Network settings of an agent pool. + + :ivar node_public_ip_tags: IPTags of instance-level public IPs. + :vartype node_public_ip_tags: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.IPTag] + :ivar allowed_host_ports: The port ranges that are allowed to access. The specified ranges are + allowed to overlap. + :vartype allowed_host_ports: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PortRange] + :ivar application_security_groups: The IDs of the application security groups which agent pool + will associate when created. + :vartype application_security_groups: list[str] + """ + + _attribute_map = { + "node_public_ip_tags": {"key": "nodePublicIPTags", "type": "[IPTag]"}, + "allowed_host_ports": {"key": "allowedHostPorts", "type": "[PortRange]"}, + "application_security_groups": {"key": "applicationSecurityGroups", "type": "[str]"}, + } + + def __init__( + self, + *, + node_public_ip_tags: Optional[List["_models.IPTag"]] = None, + allowed_host_ports: Optional[List["_models.PortRange"]] = None, + application_security_groups: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword node_public_ip_tags: IPTags of instance-level public IPs. + :paramtype node_public_ip_tags: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.IPTag] + :keyword allowed_host_ports: The port ranges that are allowed to access. The specified ranges + are allowed to overlap. + :paramtype allowed_host_ports: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PortRange] + :keyword application_security_groups: The IDs of the application security groups which agent + pool will associate when created. + :paramtype application_security_groups: list[str] + """ + super().__init__(**kwargs) + self.node_public_ip_tags = node_public_ip_tags + self.allowed_host_ports = allowed_host_ports + self.application_security_groups = application_security_groups + + +class AgentPoolUpgradeProfile(_serialization.Model): + """The list of available upgrades for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the agent pool upgrade profile. + :vartype id: str + :ivar name: The name of the agent pool upgrade profile. + :vartype name: str + :ivar type: The type of the agent pool upgrade profile. + :vartype type: str + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :vartype kubernetes_version: str + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :ivar upgrades: List of orchestrator types and versions available for upgrade. + :vartype upgrades: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :ivar latest_node_image_version: The latest AKS supported node image version. + :vartype latest_node_image_version: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kubernetes_version": {"required": True}, + "os_type": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "upgrades": {"key": "properties.upgrades", "type": "[AgentPoolUpgradeProfilePropertiesUpgradesItem]"}, + "latest_node_image_version": {"key": "properties.latestNodeImageVersion", "type": "str"}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "_models.OSType"] = "Linux", + upgrades: Optional[List["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :paramtype kubernetes_version: str + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :keyword upgrades: List of orchestrator types and versions available for upgrade. + :paramtype upgrades: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :keyword latest_node_image_version: The latest AKS supported node image version. + :paramtype latest_node_image_version: str + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kubernetes_version = kubernetes_version + self.os_type = os_type + self.upgrades = upgrades + self.latest_node_image_version = latest_node_image_version + + +class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): + """AgentPoolUpgradeProfilePropertiesUpgradesItem. + + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). + :vartype kubernetes_version: str + :ivar is_preview: Whether the Kubernetes version is currently in preview. + :vartype is_preview: bool + """ + + _attribute_map = { + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "is_preview": {"key": "isPreview", "type": "bool"}, + } + + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). + :paramtype kubernetes_version: str + :keyword is_preview: Whether the Kubernetes version is currently in preview. + :paramtype is_preview: bool + """ + super().__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolUpgradeSettings(_serialization.Model): + """Settings for upgrading an agentpool. + + :ivar max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). + If a percentage is specified, it is the percentage of the total agent pool size at the time of + the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is + 1. For more information, including best practices, see: + https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + :vartype max_surge: str + """ + + _attribute_map = { + "max_surge": {"key": "maxSurge", "type": "str"}, + } + + def __init__(self, *, max_surge: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. + '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the + time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the + default is 1. For more information, including best practices, see: + https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + :paramtype max_surge: str + """ + super().__init__(**kwargs) + self.max_surge = max_surge + + +class AgentPoolWindowsProfile(_serialization.Model): + """The Windows agent pool's specific profile. + + :ivar disable_outbound_nat: The default value is false. Outbound NAT can only be disabled if + the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP + enabled. + :vartype disable_outbound_nat: bool + """ + + _attribute_map = { + "disable_outbound_nat": {"key": "disableOutboundNat", "type": "bool"}, + } + + def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword disable_outbound_nat: The default value is false. Outbound NAT can only be disabled if + the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP + enabled. + :paramtype disable_outbound_nat: bool + """ + super().__init__(**kwargs) + self.disable_outbound_nat = disable_outbound_nat + + +class AzureKeyVaultKms(_serialization.Model): + """Azure Key Vault key management service settings for the security profile. + + :ivar enabled: Whether to enable Azure Key Vault key management service. The default is false. + :vartype enabled: bool + :ivar key_id: Identifier of Azure Key Vault key. See `key identifier format + `_ + for more details. When Azure Key Vault key management service is enabled, this field is + required and must be a valid key identifier. When Azure Key Vault key management service is + disabled, leave the field empty. + :vartype key_id: str + :ivar key_vault_network_access: Network access of key vault. The possible values are ``Public`` + and ``Private``. ``Public`` means the key vault allows public access from all networks. + ``Private`` means the key vault disables public access and enables private link. The default + value is ``Public``. Known values are: "Public" and "Private". + :vartype key_vault_network_access: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KeyVaultNetworkAccessTypes + :ivar key_vault_resource_id: Resource ID of key vault. When keyVaultNetworkAccess is + ``Private``\ , this field is required and must be a valid resource ID. When + keyVaultNetworkAccess is ``Public``\ , leave the field empty. + :vartype key_vault_resource_id: str + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "key_id": {"key": "keyId", "type": "str"}, + "key_vault_network_access": {"key": "keyVaultNetworkAccess", "type": "str"}, + "key_vault_resource_id": {"key": "keyVaultResourceId", "type": "str"}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + key_id: Optional[str] = None, + key_vault_network_access: Union[str, "_models.KeyVaultNetworkAccessTypes"] = "Public", + key_vault_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether to enable Azure Key Vault key management service. The default is + false. + :paramtype enabled: bool + :keyword key_id: Identifier of Azure Key Vault key. See `key identifier format + `_ + for more details. When Azure Key Vault key management service is enabled, this field is + required and must be a valid key identifier. When Azure Key Vault key management service is + disabled, leave the field empty. + :paramtype key_id: str + :keyword key_vault_network_access: Network access of key vault. The possible values are + ``Public`` and ``Private``. ``Public`` means the key vault allows public access from all + networks. ``Private`` means the key vault disables public access and enables private link. The + default value is ``Public``. Known values are: "Public" and "Private". + :paramtype key_vault_network_access: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KeyVaultNetworkAccessTypes + :keyword key_vault_resource_id: Resource ID of key vault. When keyVaultNetworkAccess is + ``Private``\ , this field is required and must be a valid resource ID. When + keyVaultNetworkAccess is ``Public``\ , leave the field empty. + :paramtype key_vault_resource_id: str + """ + super().__init__(**kwargs) + self.enabled = enabled + self.key_id = key_id + self.key_vault_network_access = key_vault_network_access + self.key_vault_resource_id = key_vault_resource_id + + +class CloudErrorBody(_serialization.Model): + """An error response from the Container service. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of the property in + error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.CloudErrorBody] + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[CloudErrorBody]"}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["_models.CloudErrorBody"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :paramtype code: str + :keyword message: A message describing the error, intended to be suitable for display in a user + interface. + :paramtype message: str + :keyword target: The target of the particular error. For example, the name of the property in + error. + :paramtype target: str + :keyword details: A list of additional details about the error. + :paramtype details: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.CloudErrorBody] + """ + super().__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ClusterUpgradeSettings(_serialization.Model): + """Settings for upgrading a cluster. + + :ivar override_settings: Settings for overrides. + :vartype override_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.UpgradeOverrideSettings + """ + + _attribute_map = { + "override_settings": {"key": "overrideSettings", "type": "UpgradeOverrideSettings"}, + } + + def __init__(self, *, override_settings: Optional["_models.UpgradeOverrideSettings"] = None, **kwargs: Any) -> None: + """ + :keyword override_settings: Settings for overrides. + :paramtype override_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.UpgradeOverrideSettings + """ + super().__init__(**kwargs) + self.override_settings = override_settings + + +class ContainerServiceDiagnosticsProfile(_serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar vm_diagnostics: Profile for diagnostics on the container service VMs. Required. + :vartype vm_diagnostics: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceVMDiagnostics + """ + + _validation = { + "vm_diagnostics": {"required": True}, + } + + _attribute_map = { + "vm_diagnostics": {"key": "vmDiagnostics", "type": "ContainerServiceVMDiagnostics"}, + } + + def __init__(self, *, vm_diagnostics: "_models.ContainerServiceVMDiagnostics", **kwargs: Any) -> None: + """ + :keyword vm_diagnostics: Profile for diagnostics on the container service VMs. Required. + :paramtype vm_diagnostics: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceVMDiagnostics + """ + super().__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(_serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar admin_username: The administrator username to use for Linux VMs. Required. + :vartype admin_username: str + :ivar ssh: The SSH configuration for Linux-based VMs running on Azure. Required. + :vartype ssh: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceSshConfiguration + """ + + _validation = { + "admin_username": {"required": True, "pattern": r"^[A-Za-z][-A-Za-z0-9_]*$"}, + "ssh": {"required": True}, + } + + _attribute_map = { + "admin_username": {"key": "adminUsername", "type": "str"}, + "ssh": {"key": "ssh", "type": "ContainerServiceSshConfiguration"}, + } + + def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConfiguration", **kwargs: Any) -> None: + """ + :keyword admin_username: The administrator username to use for Linux VMs. Required. + :paramtype admin_username: str + :keyword ssh: The SSH configuration for Linux-based VMs running on Azure. Required. + :paramtype ssh: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceSshConfiguration + """ + super().__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceMasterProfile(_serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar count: Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, + and 5. The default value is 1. Known values are: 1, 3, and 5. + :vartype count: int or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Count + :ivar dns_prefix: DNS prefix to be used to create the FQDN for the master pool. Required. + :vartype dns_prefix: str + :ivar vm_size: Size of agent VMs. Required. Known values are: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", and "Standard_NV6". + :vartype vm_size: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceVMSizeTypes + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in this master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :vartype vnet_subnet_id: str + :ivar first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static ip + of masters. + :vartype first_consecutive_static_ip: str + :ivar storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Known values are: "StorageAccount" and "ManagedDisks". + :vartype storage_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + "dns_prefix": {"required": True}, + "vm_size": {"required": True}, + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "fqdn": {"readonly": True}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "dns_prefix": {"key": "dnsPrefix", "type": "str"}, + "vm_size": {"key": "vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, + "vnet_subnet_id": {"key": "vnetSubnetID", "type": "str"}, + "first_consecutive_static_ip": {"key": "firstConsecutiveStaticIP", "type": "str"}, + "storage_profile": {"key": "storageProfile", "type": "str"}, + "fqdn": {"key": "fqdn", "type": "str"}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "_models.ContainerServiceVMSizeTypes"], + count: Union[int, "_models.Count"] = 1, + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: str = "10.240.255.5", + storage_profile: Optional[Union[str, "_models.ContainerServiceStorageProfileTypes"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Known values are: 1, 3, and 5. + :paramtype count: int or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Count + :keyword dns_prefix: DNS prefix to be used to create the FQDN for the master pool. Required. + :paramtype dns_prefix: str + :keyword vm_size: Size of agent VMs. Required. Known values are: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", and "Standard_NV6". + :paramtype vm_size: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceVMSizeTypes + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :paramtype vnet_subnet_id: str + :keyword first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :paramtype first_consecutive_static_ip: str + :keyword storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Known values are: "StorageAccount" and "ManagedDisks". + :paramtype storage_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceStorageProfileTypes + """ + super().__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceNetworkProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Profile of network configuration. + + :ivar network_plugin: Network plugin used for building the Kubernetes network. Known values + are: "azure", "kubenet", and "none". + :vartype network_plugin: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPlugin + :ivar network_plugin_mode: Network plugin mode used for building the Kubernetes network. + "Overlay" + :vartype network_plugin_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPluginMode + :ivar network_policy: Network policy used for building the Kubernetes network. Known values + are: "calico" and "azure". + :vartype network_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPolicy + :ivar network_mode: This cannot be specified if networkPlugin is anything other than 'azure'. + Known values are: "transparent" and "bridge". + :vartype network_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkMode + :ivar ebpf_dataplane: The eBPF dataplane used for building the Kubernetes network. "cilium" + :vartype ebpf_dataplane: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.EbpfDataplane + :ivar pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :vartype pod_cidr: str + :ivar service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :vartype service_cidr: str + :ivar dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :vartype dns_service_ip: str + :ivar docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :vartype docker_bridge_cidr: str + :ivar outbound_type: This can only be set at cluster creation time and cannot be changed later. + For more information see `egress outbound type + `_. Known values are: "loadBalancer", + "userDefinedRouting", "managedNATGateway", and "userAssignedNATGateway". + :vartype outbound_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OutboundType + :ivar load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. Known values are: "standard" and "basic". + :vartype load_balancer_sku: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LoadBalancerSku + :ivar load_balancer_profile: Profile of the cluster load balancer. + :vartype load_balancer_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfile + :ivar nat_gateway_profile: Profile of the cluster NAT gateway. + :vartype nat_gateway_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterNATGatewayProfile + :ivar pod_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each + IP family (IPv4/IPv6), is expected for dual-stack networking. + :vartype pod_cidrs: list[str] + :ivar service_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for + each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with + any Subnet IP ranges. + :vartype service_cidrs: list[str] + :ivar ip_families: IP families are used to determine single-stack or dual-stack clusters. For + single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and + IPv6. + :vartype ip_families: list[str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.IpFamily] + :ivar kube_proxy_config: Holds configuration customizations for kube-proxy. Any values not + defined will use the kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. + :vartype kube_proxy_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfig + """ + + _validation = { + "pod_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, + "service_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, + "dns_service_ip": { + "pattern": r"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "docker_bridge_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, + } + + _attribute_map = { + "network_plugin": {"key": "networkPlugin", "type": "str"}, + "network_plugin_mode": {"key": "networkPluginMode", "type": "str"}, + "network_policy": {"key": "networkPolicy", "type": "str"}, + "network_mode": {"key": "networkMode", "type": "str"}, + "ebpf_dataplane": {"key": "ebpfDataplane", "type": "str"}, + "pod_cidr": {"key": "podCidr", "type": "str"}, + "service_cidr": {"key": "serviceCidr", "type": "str"}, + "dns_service_ip": {"key": "dnsServiceIP", "type": "str"}, + "docker_bridge_cidr": {"key": "dockerBridgeCidr", "type": "str"}, + "outbound_type": {"key": "outboundType", "type": "str"}, + "load_balancer_sku": {"key": "loadBalancerSku", "type": "str"}, + "load_balancer_profile": {"key": "loadBalancerProfile", "type": "ManagedClusterLoadBalancerProfile"}, + "nat_gateway_profile": {"key": "natGatewayProfile", "type": "ManagedClusterNATGatewayProfile"}, + "pod_cidrs": {"key": "podCidrs", "type": "[str]"}, + "service_cidrs": {"key": "serviceCidrs", "type": "[str]"}, + "ip_families": {"key": "ipFamilies", "type": "[str]"}, + "kube_proxy_config": {"key": "kubeProxyConfig", "type": "ContainerServiceNetworkProfileKubeProxyConfig"}, + } + + def __init__( + self, + *, + network_plugin: Union[str, "_models.NetworkPlugin"] = "kubenet", + network_plugin_mode: Optional[Union[str, "_models.NetworkPluginMode"]] = None, + network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, + ebpf_dataplane: Optional[Union[str, "_models.EbpfDataplane"]] = None, + pod_cidr: str = "10.244.0.0/16", + service_cidr: str = "10.0.0.0/16", + dns_service_ip: str = "10.0.0.10", + docker_bridge_cidr: str = "172.17.0.1/16", + outbound_type: Union[str, "_models.OutboundType"] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, + load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, + nat_gateway_profile: Optional["_models.ManagedClusterNATGatewayProfile"] = None, + pod_cidrs: Optional[List[str]] = None, + service_cidrs: Optional[List[str]] = None, + ip_families: Optional[List[Union[str, "_models.IpFamily"]]] = None, + kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, + **kwargs: Any + ) -> None: + """ + :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values + are: "azure", "kubenet", and "none". + :paramtype network_plugin: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPlugin + :keyword network_plugin_mode: Network plugin mode used for building the Kubernetes network. + "Overlay" + :paramtype network_plugin_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPluginMode + :keyword network_policy: Network policy used for building the Kubernetes network. Known values + are: "calico" and "azure". + :paramtype network_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPolicy + :keyword network_mode: This cannot be specified if networkPlugin is anything other than + 'azure'. Known values are: "transparent" and "bridge". + :paramtype network_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkMode + :keyword ebpf_dataplane: The eBPF dataplane used for building the Kubernetes network. "cilium" + :paramtype ebpf_dataplane: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.EbpfDataplane + :keyword pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :paramtype pod_cidr: str + :keyword service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It + must not overlap with any Subnet IP ranges. + :paramtype service_cidr: str + :keyword dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be + within the Kubernetes service address range specified in serviceCidr. + :paramtype dns_service_ip: str + :keyword docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :paramtype docker_bridge_cidr: str + :keyword outbound_type: This can only be set at cluster creation time and cannot be changed + later. For more information see `egress outbound type + `_. Known values are: "loadBalancer", + "userDefinedRouting", "managedNATGateway", and "userAssignedNATGateway". + :paramtype outbound_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OutboundType + :keyword load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. Known values are: "standard" and "basic". + :paramtype load_balancer_sku: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LoadBalancerSku + :keyword load_balancer_profile: Profile of the cluster load balancer. + :paramtype load_balancer_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfile + :keyword nat_gateway_profile: Profile of the cluster NAT gateway. + :paramtype nat_gateway_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterNATGatewayProfile + :keyword pod_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for + each IP family (IPv4/IPv6), is expected for dual-stack networking. + :paramtype pod_cidrs: list[str] + :keyword service_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one + for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap + with any Subnet IP ranges. + :paramtype service_cidrs: list[str] + :keyword ip_families: IP families are used to determine single-stack or dual-stack clusters. + For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and + IPv6. + :paramtype ip_families: list[str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.IpFamily] + :keyword kube_proxy_config: Holds configuration customizations for kube-proxy. Any values not + defined will use the kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. + :paramtype kube_proxy_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfig + """ + super().__init__(**kwargs) + self.network_plugin = network_plugin + self.network_plugin_mode = network_plugin_mode + self.network_policy = network_policy + self.network_mode = network_mode + self.ebpf_dataplane = ebpf_dataplane + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + self.outbound_type = outbound_type + self.load_balancer_sku = load_balancer_sku + self.load_balancer_profile = load_balancer_profile + self.nat_gateway_profile = nat_gateway_profile + self.pod_cidrs = pod_cidrs + self.service_cidrs = service_cidrs + self.ip_families = ip_families + self.kube_proxy_config = kube_proxy_config + + +class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.Model): + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See + https://v:code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where :code:`` is represented by a :code:``-:code:`` + string. Kubernetes version 1.23 would be '1-23'. + + :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + kube-proxy is enabled in AKS by default without these customizations). + :vartype enabled: bool + :ivar mode: Specify which proxy mode to use ('IPTABLES' or 'IPVS'). Known values are: + "IPTABLES" and "IPVS". + :vartype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Mode + :ivar ipvs_config: Holds configuration customizations for IPVS. May only be specified if 'mode' + is set to 'IPVS'. + :vartype ipvs_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "mode": {"key": "mode", "type": "str"}, + "ipvs_config": {"key": "ipvsConfig", "type": "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + mode: Optional[Union[str, "_models.Mode"]] = None, + ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' + exists, kube-proxy is enabled in AKS by default without these customizations). + :paramtype enabled: bool + :keyword mode: Specify which proxy mode to use ('IPTABLES' or 'IPVS'). Known values are: + "IPTABLES" and "IPVS". + :paramtype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Mode + :keyword ipvs_config: Holds configuration customizations for IPVS. May only be specified if + 'mode' is set to 'IPVS'. + :paramtype ipvs_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + """ + super().__init__(**kwargs) + self.enabled = enabled + self.mode = mode + self.ipvs_config = ipvs_config + + +class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(_serialization.Model): + """Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + + :ivar scheduler: IPVS scheduler, for more information please see + http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and + "LeastConnection". + :vartype scheduler: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.IpvsScheduler + :ivar tcp_timeout_seconds: The timeout value used for idle IPVS TCP sessions in seconds. Must + be a positive integer value. + :vartype tcp_timeout_seconds: int + :ivar tcp_fin_timeout_seconds: The timeout value used for IPVS TCP sessions after receiving a + FIN in seconds. Must be a positive integer value. + :vartype tcp_fin_timeout_seconds: int + :ivar udp_timeout_seconds: The timeout value used for IPVS UDP packets in seconds. Must be a + positive integer value. + :vartype udp_timeout_seconds: int + """ + + _attribute_map = { + "scheduler": {"key": "scheduler", "type": "str"}, + "tcp_timeout_seconds": {"key": "tcpTimeoutSeconds", "type": "int"}, + "tcp_fin_timeout_seconds": {"key": "tcpFinTimeoutSeconds", "type": "int"}, + "udp_timeout_seconds": {"key": "udpTimeoutSeconds", "type": "int"}, + } + + def __init__( + self, + *, + scheduler: Optional[Union[str, "_models.IpvsScheduler"]] = None, + tcp_timeout_seconds: Optional[int] = None, + tcp_fin_timeout_seconds: Optional[int] = None, + udp_timeout_seconds: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword scheduler: IPVS scheduler, for more information please see + http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and + "LeastConnection". + :paramtype scheduler: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.IpvsScheduler + :keyword tcp_timeout_seconds: The timeout value used for idle IPVS TCP sessions in seconds. + Must be a positive integer value. + :paramtype tcp_timeout_seconds: int + :keyword tcp_fin_timeout_seconds: The timeout value used for IPVS TCP sessions after receiving + a FIN in seconds. Must be a positive integer value. + :paramtype tcp_fin_timeout_seconds: int + :keyword udp_timeout_seconds: The timeout value used for IPVS UDP packets in seconds. Must be a + positive integer value. + :paramtype udp_timeout_seconds: int + """ + super().__init__(**kwargs) + self.scheduler = scheduler + self.tcp_timeout_seconds = tcp_timeout_seconds + self.tcp_fin_timeout_seconds = tcp_fin_timeout_seconds + self.udp_timeout_seconds = udp_timeout_seconds + + +class ContainerServiceSshConfiguration(_serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :ivar public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A + maximum of 1 key may be specified. Required. + :vartype public_keys: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceSshPublicKey] + """ + + _validation = { + "public_keys": {"required": True}, + } + + _attribute_map = { + "public_keys": {"key": "publicKeys", "type": "[ContainerServiceSshPublicKey]"}, + } + + def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], **kwargs: Any) -> None: + """ + :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A + maximum of 1 key may be specified. Required. + :paramtype public_keys: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceSshPublicKey] + """ + super().__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(_serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :ivar key_data: Certificate public key used to authenticate with VMs through SSH. The + certificate must be in PEM format with or without headers. Required. + :vartype key_data: str + """ + + _validation = { + "key_data": {"required": True}, + } + + _attribute_map = { + "key_data": {"key": "keyData", "type": "str"}, + } + + def __init__(self, *, key_data: str, **kwargs: Any) -> None: + """ + :keyword key_data: Certificate public key used to authenticate with VMs through SSH. The + certificate must be in PEM format with or without headers. Required. + :paramtype key_data: str + """ + super().__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(_serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. + :vartype enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + "enabled": {"required": True}, + "storage_uri": {"readonly": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "storage_uri": {"key": "storageUri", "type": "str"}, + } + + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: + """ + :keyword enabled: Whether the VM diagnostic agent is provisioned on the VM. Required. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class CreationData(_serialization.Model): + """Data used when creating a target resource from a source resource. + + :ivar source_resource_id: This is the ARM ID of the source object to be used to create the + target object. + :vartype source_resource_id: str + """ + + _attribute_map = { + "source_resource_id": {"key": "sourceResourceId", "type": "str"}, + } + + def __init__(self, *, source_resource_id: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword source_resource_id: This is the ARM ID of the source object to be used to create the + target object. + :paramtype source_resource_id: str + """ + super().__init__(**kwargs) + self.source_resource_id = source_resource_id + + +class CredentialResult(_serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytes + """ + + _validation = { + "name": {"readonly": True}, + "value": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "bytearray"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(_serialization.Model): + """The list credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.CredentialResult] + """ + + _validation = { + "kubeconfigs": {"readonly": True}, + } + + _attribute_map = { + "kubeconfigs": {"key": "kubeconfigs", "type": "[CredentialResult]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.kubeconfigs = None + + +class DailySchedule(_serialization.Model): + """For schedules like: 'recur every day' or 'recur every 3 days'. + + All required parameters must be populated in order to send to Azure. + + :ivar interval_days: Specifies the number of days between each set of occurrences. Required. + :vartype interval_days: int + """ + + _validation = { + "interval_days": {"required": True, "maximum": 7, "minimum": 1}, + } + + _attribute_map = { + "interval_days": {"key": "intervalDays", "type": "int"}, + } + + def __init__(self, *, interval_days: int, **kwargs: Any) -> None: + """ + :keyword interval_days: Specifies the number of days between each set of occurrences. Required. + :paramtype interval_days: int + """ + super().__init__(**kwargs) + self.interval_days = interval_days + + +class DateSpan(_serialization.Model): + """For example, between '2022-12-23' and '2023-01-05'. + + All required parameters must be populated in order to send to Azure. + + :ivar start: The start date of the date span. Required. + :vartype start: ~datetime.date + :ivar end: The end date of the date span. Required. + :vartype end: ~datetime.date + """ + + _validation = { + "start": {"required": True}, + "end": {"required": True}, + } + + _attribute_map = { + "start": {"key": "start", "type": "date"}, + "end": {"key": "end", "type": "date"}, + } + + def __init__(self, *, start: datetime.date, end: datetime.date, **kwargs: Any) -> None: + """ + :keyword start: The start date of the date span. Required. + :paramtype start: ~datetime.date + :keyword end: The end date of the date span. Required. + :paramtype end: ~datetime.date + """ + super().__init__(**kwargs) + self.start = start + self.end = end + + +class EndpointDependency(_serialization.Model): + """A domain name that AKS agent nodes are reaching at. + + :ivar domain_name: The domain name of the dependency. + :vartype domain_name: str + :ivar endpoint_details: The Ports and Protocols used when connecting to domainName. + :vartype endpoint_details: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.EndpointDetail] + """ + + _attribute_map = { + "domain_name": {"key": "domainName", "type": "str"}, + "endpoint_details": {"key": "endpointDetails", "type": "[EndpointDetail]"}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["_models.EndpointDetail"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword domain_name: The domain name of the dependency. + :paramtype domain_name: str + :keyword endpoint_details: The Ports and Protocols used when connecting to domainName. + :paramtype endpoint_details: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.EndpointDetail] + """ + super().__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(_serialization.Model): + """connect information from the AKS agent nodes to a single endpoint. + + :ivar ip_address: An IP Address that Domain Name currently resolves to. + :vartype ip_address: str + :ivar port: The port an endpoint is connected to. + :vartype port: int + :ivar protocol: The protocol used for connection. + :vartype protocol: str + :ivar description: Description of the detail. + :vartype description: str + """ + + _attribute_map = { + "ip_address": {"key": "ipAddress", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "protocol": {"key": "protocol", "type": "str"}, + "description": {"key": "description", "type": "str"}, + } + + def __init__( + self, + *, + ip_address: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword ip_address: An IP Address that Domain Name currently resolves to. + :paramtype ip_address: str + :keyword port: The port an endpoint is connected to. + :paramtype port: int + :keyword protocol: The protocol used for connection. + :paramtype protocol: str + :keyword description: Description of the detail. + :paramtype description: str + """ + super().__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.protocol = protocol + self.description = description + + +class ExtendedLocation(_serialization.Model): + """The complex type of the extended location. + + :ivar name: The name of the extended location. + :vartype name: str + :ivar type: The type of the extended location. "EdgeZone" + :vartype type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ExtendedLocationTypes + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the extended location. + :paramtype name: str + :keyword type: The type of the extended location. "EdgeZone" + :paramtype type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ExtendedLocationTypes + """ + super().__init__(**kwargs) + self.name = name + self.type = type + + +class GuardrailsProfile(_serialization.Model): + """The Guardrails profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar system_excluded_namespaces: List of namespaces specified by AKS to be excluded from + Guardrails. + :vartype system_excluded_namespaces: list[str] + :ivar version: The version of constraints to use. Required. + :vartype version: str + :ivar level: The guardrails level to be used. By default, Guardrails is enabled for all + namespaces except those that AKS excludes via systemExcludedNamespaces. Required. Known values + are: "Off", "Warning", and "Enforcement". + :vartype level: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Level + :ivar excluded_namespaces: List of namespaces excluded from guardrails checks. + :vartype excluded_namespaces: list[str] + """ + + _validation = { + "system_excluded_namespaces": {"readonly": True}, + "version": {"required": True}, + "level": {"required": True}, + } + + _attribute_map = { + "system_excluded_namespaces": {"key": "systemExcludedNamespaces", "type": "[str]"}, + "version": {"key": "version", "type": "str"}, + "level": {"key": "level", "type": "str"}, + "excluded_namespaces": {"key": "excludedNamespaces", "type": "[str]"}, + } + + def __init__( + self, + *, + version: str, + level: Union[str, "_models.Level"], + excluded_namespaces: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword version: The version of constraints to use. Required. + :paramtype version: str + :keyword level: The guardrails level to be used. By default, Guardrails is enabled for all + namespaces except those that AKS excludes via systemExcludedNamespaces. Required. Known values + are: "Off", "Warning", and "Enforcement". + :paramtype level: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Level + :keyword excluded_namespaces: List of namespaces excluded from guardrails checks. + :paramtype excluded_namespaces: list[str] + """ + super().__init__(**kwargs) + self.system_excluded_namespaces = None + self.version = version + self.level = level + self.excluded_namespaces = excluded_namespaces + + +class IPTag(_serialization.Model): + """Contains the IPTag associated with the object. + + :ivar ip_tag_type: The IP tag type. Example: RoutingPreference. + :vartype ip_tag_type: str + :ivar tag: The value of the IP tag associated with the public IP. Example: Internet. + :vartype tag: str + """ + + _attribute_map = { + "ip_tag_type": {"key": "ipTagType", "type": "str"}, + "tag": {"key": "tag", "type": "str"}, + } + + def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword ip_tag_type: The IP tag type. Example: RoutingPreference. + :paramtype ip_tag_type: str + :keyword tag: The value of the IP tag associated with the public IP. Example: Internet. + :paramtype tag: str + """ + super().__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + +class KubeletConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes + """See `AKS custom node configuration + `_ for more details. + + :ivar cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'. + :vartype cpu_manager_policy: str + :ivar cpu_cfs_quota: The default is true. + :vartype cpu_cfs_quota: bool + :ivar cpu_cfs_quota_period: The default is '100ms.' Valid values are a sequence of decimal + numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + :vartype cpu_cfs_quota_period: str + :ivar image_gc_high_threshold: To disable image garbage collection, set to 100. The default is + 85%. + :vartype image_gc_high_threshold: int + :ivar image_gc_low_threshold: This cannot be set higher than imageGcHighThreshold. The default + is 80%. + :vartype image_gc_low_threshold: int + :ivar topology_manager_policy: For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + :vartype topology_manager_policy: str + :ivar allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending + in ``*``\ ). + :vartype allowed_unsafe_sysctls: list[str] + :ivar fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled on + the node. + :vartype fail_swap_on: bool + :ivar container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. + :vartype container_log_max_size_mb: int + :ivar container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. + :vartype container_log_max_files: int + :ivar pod_max_pids: The maximum number of processes per pod. + :vartype pod_max_pids: int + """ + + _validation = { + "container_log_max_files": {"minimum": 2}, + } + + _attribute_map = { + "cpu_manager_policy": {"key": "cpuManagerPolicy", "type": "str"}, + "cpu_cfs_quota": {"key": "cpuCfsQuota", "type": "bool"}, + "cpu_cfs_quota_period": {"key": "cpuCfsQuotaPeriod", "type": "str"}, + "image_gc_high_threshold": {"key": "imageGcHighThreshold", "type": "int"}, + "image_gc_low_threshold": {"key": "imageGcLowThreshold", "type": "int"}, + "topology_manager_policy": {"key": "topologyManagerPolicy", "type": "str"}, + "allowed_unsafe_sysctls": {"key": "allowedUnsafeSysctls", "type": "[str]"}, + "fail_swap_on": {"key": "failSwapOn", "type": "bool"}, + "container_log_max_size_mb": {"key": "containerLogMaxSizeMB", "type": "int"}, + "container_log_max_files": {"key": "containerLogMaxFiles", "type": "int"}, + "pod_max_pids": {"key": "podMaxPids", "type": "int"}, + } + + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + container_log_max_size_mb: Optional[int] = None, + container_log_max_files: Optional[int] = None, + pod_max_pids: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'. + :paramtype cpu_manager_policy: str + :keyword cpu_cfs_quota: The default is true. + :paramtype cpu_cfs_quota: bool + :keyword cpu_cfs_quota_period: The default is '100ms.' Valid values are a sequence of decimal + numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + :paramtype cpu_cfs_quota_period: str + :keyword image_gc_high_threshold: To disable image garbage collection, set to 100. The default + is 85%. + :paramtype image_gc_high_threshold: int + :keyword image_gc_low_threshold: This cannot be set higher than imageGcHighThreshold. The + default is 80%. + :paramtype image_gc_low_threshold: int + :keyword topology_manager_policy: For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + :paramtype topology_manager_policy: str + :keyword allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns + (ending in ``*``\ ). + :paramtype allowed_unsafe_sysctls: list[str] + :keyword fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. + :paramtype fail_swap_on: bool + :keyword container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before + it is rotated. + :paramtype container_log_max_size_mb: int + :keyword container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. + :paramtype container_log_max_files: int + :keyword pod_max_pids: The maximum number of processes per pod. + :paramtype pod_max_pids: int + """ + super().__init__(**kwargs) + self.cpu_manager_policy = cpu_manager_policy + self.cpu_cfs_quota = cpu_cfs_quota + self.cpu_cfs_quota_period = cpu_cfs_quota_period + self.image_gc_high_threshold = image_gc_high_threshold + self.image_gc_low_threshold = image_gc_low_threshold + self.topology_manager_policy = topology_manager_policy + self.allowed_unsafe_sysctls = allowed_unsafe_sysctls + self.fail_swap_on = fail_swap_on + self.container_log_max_size_mb = container_log_max_size_mb + self.container_log_max_files = container_log_max_files + self.pod_max_pids = pod_max_pids + + +class LinuxOSConfig(_serialization.Model): + """See `AKS custom node configuration + `_ for more details. + + :ivar sysctls: Sysctl settings for Linux agent nodes. + :vartype sysctls: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SysctlConfig + :ivar transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The + default is 'always'. For more information see `Transparent Hugepages + `_. + :vartype transparent_huge_page_enabled: str + :ivar transparent_huge_page_defrag: Valid values are 'always', 'defer', 'defer+madvise', + 'madvise' and 'never'. The default is 'madvise'. For more information see `Transparent + Hugepages + `_. + :vartype transparent_huge_page_defrag: str + :ivar swap_file_size_mb: The size in MB of a swap file that will be created on each node. + :vartype swap_file_size_mb: int + """ + + _attribute_map = { + "sysctls": {"key": "sysctls", "type": "SysctlConfig"}, + "transparent_huge_page_enabled": {"key": "transparentHugePageEnabled", "type": "str"}, + "transparent_huge_page_defrag": {"key": "transparentHugePageDefrag", "type": "str"}, + "swap_file_size_mb": {"key": "swapFileSizeMB", "type": "int"}, + } + + def __init__( + self, + *, + sysctls: Optional["_models.SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword sysctls: Sysctl settings for Linux agent nodes. + :paramtype sysctls: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SysctlConfig + :keyword transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The + default is 'always'. For more information see `Transparent Hugepages + `_. + :paramtype transparent_huge_page_enabled: str + :keyword transparent_huge_page_defrag: Valid values are 'always', 'defer', 'defer+madvise', + 'madvise' and 'never'. The default is 'madvise'. For more information see `Transparent + Hugepages + `_. + :paramtype transparent_huge_page_defrag: str + :keyword swap_file_size_mb: The size in MB of a swap file that will be created on each node. + :paramtype swap_file_size_mb: int + """ + super().__init__(**kwargs) + self.sysctls = sysctls + self.transparent_huge_page_enabled = transparent_huge_page_enabled + self.transparent_huge_page_defrag = transparent_huge_page_defrag + self.swap_file_size_mb = swap_file_size_mb + + +class MaintenanceConfiguration(SubResource): + """See `planned maintenance `_ for more + information about planned maintenance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + :ivar time_in_week: If two array entries specify the same day of the week, the applied + configuration is the union of times in both entries. + :vartype time_in_week: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TimeInWeek] + :ivar not_allowed_time: Time slots on which upgrade is not allowed. + :vartype not_allowed_time: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TimeSpan] + :ivar maintenance_window: Maintenance window for the maintenance configuration. + :vartype maintenance_window: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceWindow + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "time_in_week": {"key": "properties.timeInWeek", "type": "[TimeInWeek]"}, + "not_allowed_time": {"key": "properties.notAllowedTime", "type": "[TimeSpan]"}, + "maintenance_window": {"key": "properties.maintenanceWindow", "type": "MaintenanceWindow"}, + } + + def __init__( + self, + *, + time_in_week: Optional[List["_models.TimeInWeek"]] = None, + not_allowed_time: Optional[List["_models.TimeSpan"]] = None, + maintenance_window: Optional["_models.MaintenanceWindow"] = None, + **kwargs: Any + ) -> None: + """ + :keyword time_in_week: If two array entries specify the same day of the week, the applied + configuration is the union of times in both entries. + :paramtype time_in_week: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TimeInWeek] + :keyword not_allowed_time: Time slots on which upgrade is not allowed. + :paramtype not_allowed_time: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TimeSpan] + :keyword maintenance_window: Maintenance window for the maintenance configuration. + :paramtype maintenance_window: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceWindow + """ + super().__init__(**kwargs) + self.system_data = None + self.time_in_week = time_in_week + self.not_allowed_time = not_allowed_time + self.maintenance_window = maintenance_window + + +class MaintenanceConfigurationListResult(_serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of maintenance configurations. + :vartype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[MaintenanceConfiguration]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of maintenance configurations. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class MaintenanceWindow(_serialization.Model): + """Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar schedule: Recurrence schedule for the maintenance window. Required. + :vartype schedule: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Schedule + :ivar duration_hours: Length of maintenance window range from 4 to 24 hours. + :vartype duration_hours: int + :ivar utc_offset: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' + for PST. If not specified, the default is '+00:00'. + :vartype utc_offset: str + :ivar start_date: The date the maintenance window activates. If the current date is before this + date, the maintenance window is inactive and will not be used for upgrades. If not specified, + the maintenance window will be active right away. + :vartype start_date: ~datetime.date + :ivar start_time: The start time of the maintenance window. Accepted values are from '00:00' to + '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means + UTC time '00:00'. Required. + :vartype start_time: str + :ivar not_allowed_dates: Date ranges on which upgrade is not allowed. 'utcOffset' applies to + this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to + '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC + time. + :vartype not_allowed_dates: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.DateSpan] + """ + + _validation = { + "schedule": {"required": True}, + "duration_hours": {"required": True, "maximum": 24, "minimum": 4}, + "utc_offset": {"pattern": r"^(-|\+)[0-9]{2}:[0-9]{2}$"}, + "start_time": {"required": True, "pattern": r"^\d{2}:\d{2}$"}, + } + + _attribute_map = { + "schedule": {"key": "schedule", "type": "Schedule"}, + "duration_hours": {"key": "durationHours", "type": "int"}, + "utc_offset": {"key": "utcOffset", "type": "str"}, + "start_date": {"key": "startDate", "type": "date"}, + "start_time": {"key": "startTime", "type": "str"}, + "not_allowed_dates": {"key": "notAllowedDates", "type": "[DateSpan]"}, + } + + def __init__( + self, + *, + schedule: "_models.Schedule", + duration_hours: int = 24, + start_time: str, + utc_offset: Optional[str] = None, + start_date: Optional[datetime.date] = None, + not_allowed_dates: Optional[List["_models.DateSpan"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword schedule: Recurrence schedule for the maintenance window. Required. + :paramtype schedule: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Schedule + :keyword duration_hours: Length of maintenance window range from 4 to 24 hours. + :paramtype duration_hours: int + :keyword utc_offset: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and + '-07:00' for PST. If not specified, the default is '+00:00'. + :paramtype utc_offset: str + :keyword start_date: The date the maintenance window activates. If the current date is before + this date, the maintenance window is inactive and will not be used for upgrades. If not + specified, the maintenance window will be active right away. + :paramtype start_date: ~datetime.date + :keyword start_time: The start time of the maintenance window. Accepted values are from '00:00' + to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' + means UTC time '00:00'. Required. + :paramtype start_time: str + :keyword not_allowed_dates: Date ranges on which upgrade is not allowed. 'utcOffset' applies to + this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to + '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC + time. + :paramtype not_allowed_dates: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.DateSpan] + """ + super().__init__(**kwargs) + self.schedule = schedule + self.duration_hours = duration_hours + self.utc_offset = utc_offset + self.start_date = start_date + self.start_time = start_time + self.not_allowed_dates = not_allowed_dates + + +class Resource(_serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + } + + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + """ + super().__init__(**kwargs) + self.tags = tags + self.location = location + + +class ManagedCluster(TrackedResource): # pylint: disable=too-many-instance-attributes + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar sku: The managed cluster SKU. + :vartype sku: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKU + :ivar extended_location: The extended location of the Virtual Machine. + :vartype extended_location: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ExtendedLocation + :ivar identity: The identity of the managed cluster, if configured. + :vartype identity: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterIdentity + :ivar provisioning_state: The current provisioning state. + :vartype provisioning_state: str + :ivar power_state: The Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PowerState + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the cluster + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :ivar kubernetes_version: When you upgrade a supported AKS cluster, Kubernetes minor versions + cannot be skipped. All upgrades must be performed sequentially by major version number. For + example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> + 1.16.x is not allowed. See `upgrading an AKS cluster + `_ for more details. + :vartype kubernetes_version: str + :ivar current_kubernetes_version: The version of Kubernetes the Managed Cluster is running. + :vartype current_kubernetes_version: str + :ivar dns_prefix: This cannot be updated once the Managed Cluster has been created. + :vartype dns_prefix: str + :ivar fqdn_subdomain: This cannot be updated once the Managed Cluster has been created. + :vartype fqdn_subdomain: str + :ivar fqdn: The FQDN of the master pool. + :vartype fqdn: str + :ivar private_fqdn: The FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. + This special FQDN supports CORS, allowing the Azure Portal to function properly. + :vartype azure_portal_fqdn: str + :ivar agent_pool_profiles: The agent pool properties. + :vartype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAgentPoolProfile] + :ivar linux_profile: The profile for Linux VMs in the Managed Cluster. + :vartype linux_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceLinuxProfile + :ivar windows_profile: The profile for Windows VMs in the Managed Cluster. + :vartype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWindowsProfile + :ivar service_principal_profile: Information about a service principal identity for the cluster + to use for manipulating Azure APIs. + :vartype service_principal_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterServicePrincipalProfile + :ivar addon_profiles: The profile of managed cluster add-on. + :vartype addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAddonProfile] + :ivar pod_identity_profile: See `use AAD pod identity + `_ for more details on AAD pod + identity integration. + :vartype pod_identity_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProfile + :ivar oidc_issuer_profile: The OIDC issuer profile of the Managed Cluster. + :vartype oidc_issuer_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterOIDCIssuerProfile + :ivar node_resource_group: The name of the resource group containing agent pool nodes. + :vartype node_resource_group: str + :ivar node_resource_group_profile: The node resource group configuration profile. + :vartype node_resource_group_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterNodeResourceGroupProfile + :ivar enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :vartype enable_rbac: bool + :ivar enable_pod_security_policy: (DEPRECATED) Whether to enable Kubernetes pod security policy + (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in + v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + :vartype enable_pod_security_policy: bool + :ivar enable_namespace_resources: The default value is false. It can be enabled/disabled on + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource + `_ for more details on Namespace as a ARM Resource. + :vartype enable_namespace_resources: bool + :ivar network_profile: The network configuration profile. + :vartype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceNetworkProfile + :ivar aad_profile: The Azure Active Directory configuration. + :vartype aad_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAADProfile + :ivar auto_upgrade_profile: The auto upgrade configuration. + :vartype auto_upgrade_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAutoUpgradeProfile + :ivar upgrade_settings: Settings for upgrading a cluster. + :vartype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ClusterUpgradeSettings + :ivar auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :vartype auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPropertiesAutoScalerProfile + :ivar api_server_access_profile: The access profile for managed cluster API server. + :vartype api_server_access_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAPIServerAccessProfile + :ivar disk_encryption_set_id: This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + :vartype disk_encryption_set_id: str + :ivar identity_profile: Identities associated with the cluster. + :vartype identity_profile: dict[str, + ~azure.mgmt.containerservice.v2023_01_02_preview.models.UserAssignedIdentity] + :ivar private_link_resources: Private link resources associated with the cluster. + :vartype private_link_resources: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource] + :ivar disable_local_accounts: If set to true, getting static credentials will be disabled for + this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details + see `disable local accounts + `_. + :vartype disable_local_accounts: bool + :ivar http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :vartype http_proxy_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterHTTPProxyConfig + :ivar security_profile: Security profile for the managed cluster. + :vartype security_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfile + :ivar storage_profile: Storage profile for the managed cluster. + :vartype storage_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfile + :ivar ingress_profile: Ingress profile for the managed cluster. + :vartype ingress_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterIngressProfile + :ivar public_network_access: Allow or deny public network access for AKS. Known values are: + "Enabled", "Disabled", and "SecuredByPerimeter". + :vartype public_network_access: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PublicNetworkAccess + :ivar workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. + :vartype workload_auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfile + :ivar azure_monitor_profile: Prometheus addon profile for the container service cluster. + :vartype azure_monitor_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAzureMonitorProfile + :ivar guardrails_profile: The guardrails profile holds all the guardrails information for a + given cluster. + :vartype guardrails_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GuardrailsProfile + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "provisioning_state": {"readonly": True}, + "power_state": {"readonly": True}, + "max_agent_pools": {"readonly": True}, + "current_kubernetes_version": {"readonly": True}, + "fqdn": {"readonly": True}, + "private_fqdn": {"readonly": True}, + "azure_portal_fqdn": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "sku": {"key": "sku", "type": "ManagedClusterSKU"}, + "extended_location": {"key": "extendedLocation", "type": "ExtendedLocation"}, + "identity": {"key": "identity", "type": "ManagedClusterIdentity"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "power_state": {"key": "properties.powerState", "type": "PowerState"}, + "creation_data": {"key": "properties.creationData", "type": "CreationData"}, + "max_agent_pools": {"key": "properties.maxAgentPools", "type": "int"}, + "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, + "current_kubernetes_version": {"key": "properties.currentKubernetesVersion", "type": "str"}, + "dns_prefix": {"key": "properties.dnsPrefix", "type": "str"}, + "fqdn_subdomain": {"key": "properties.fqdnSubdomain", "type": "str"}, + "fqdn": {"key": "properties.fqdn", "type": "str"}, + "private_fqdn": {"key": "properties.privateFQDN", "type": "str"}, + "azure_portal_fqdn": {"key": "properties.azurePortalFQDN", "type": "str"}, + "agent_pool_profiles": {"key": "properties.agentPoolProfiles", "type": "[ManagedClusterAgentPoolProfile]"}, + "linux_profile": {"key": "properties.linuxProfile", "type": "ContainerServiceLinuxProfile"}, + "windows_profile": {"key": "properties.windowsProfile", "type": "ManagedClusterWindowsProfile"}, + "service_principal_profile": { + "key": "properties.servicePrincipalProfile", + "type": "ManagedClusterServicePrincipalProfile", + }, + "addon_profiles": {"key": "properties.addonProfiles", "type": "{ManagedClusterAddonProfile}"}, + "pod_identity_profile": {"key": "properties.podIdentityProfile", "type": "ManagedClusterPodIdentityProfile"}, + "oidc_issuer_profile": {"key": "properties.oidcIssuerProfile", "type": "ManagedClusterOIDCIssuerProfile"}, + "node_resource_group": {"key": "properties.nodeResourceGroup", "type": "str"}, + "node_resource_group_profile": { + "key": "properties.nodeResourceGroupProfile", + "type": "ManagedClusterNodeResourceGroupProfile", + }, + "enable_rbac": {"key": "properties.enableRBAC", "type": "bool"}, + "enable_pod_security_policy": {"key": "properties.enablePodSecurityPolicy", "type": "bool"}, + "enable_namespace_resources": {"key": "properties.enableNamespaceResources", "type": "bool"}, + "network_profile": {"key": "properties.networkProfile", "type": "ContainerServiceNetworkProfile"}, + "aad_profile": {"key": "properties.aadProfile", "type": "ManagedClusterAADProfile"}, + "auto_upgrade_profile": {"key": "properties.autoUpgradeProfile", "type": "ManagedClusterAutoUpgradeProfile"}, + "upgrade_settings": {"key": "properties.upgradeSettings", "type": "ClusterUpgradeSettings"}, + "auto_scaler_profile": { + "key": "properties.autoScalerProfile", + "type": "ManagedClusterPropertiesAutoScalerProfile", + }, + "api_server_access_profile": { + "key": "properties.apiServerAccessProfile", + "type": "ManagedClusterAPIServerAccessProfile", + }, + "disk_encryption_set_id": {"key": "properties.diskEncryptionSetID", "type": "str"}, + "identity_profile": {"key": "properties.identityProfile", "type": "{UserAssignedIdentity}"}, + "private_link_resources": {"key": "properties.privateLinkResources", "type": "[PrivateLinkResource]"}, + "disable_local_accounts": {"key": "properties.disableLocalAccounts", "type": "bool"}, + "http_proxy_config": {"key": "properties.httpProxyConfig", "type": "ManagedClusterHTTPProxyConfig"}, + "security_profile": {"key": "properties.securityProfile", "type": "ManagedClusterSecurityProfile"}, + "storage_profile": {"key": "properties.storageProfile", "type": "ManagedClusterStorageProfile"}, + "ingress_profile": {"key": "properties.ingressProfile", "type": "ManagedClusterIngressProfile"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "workload_auto_scaler_profile": { + "key": "properties.workloadAutoScalerProfile", + "type": "ManagedClusterWorkloadAutoScalerProfile", + }, + "azure_monitor_profile": {"key": "properties.azureMonitorProfile", "type": "ManagedClusterAzureMonitorProfile"}, + "guardrails_profile": {"key": "properties.guardrailsProfile", "type": "GuardrailsProfile"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + sku: Optional["_models.ManagedClusterSKU"] = None, + extended_location: Optional["_models.ExtendedLocation"] = None, + identity: Optional["_models.ManagedClusterIdentity"] = None, + creation_data: Optional["_models.CreationData"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + fqdn_subdomain: Optional[str] = None, + agent_pool_profiles: Optional[List["_models.ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["_models.ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["_models.ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["_models.ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "_models.ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["_models.ManagedClusterPodIdentityProfile"] = None, + oidc_issuer_profile: Optional["_models.ManagedClusterOIDCIssuerProfile"] = None, + node_resource_group: Optional[str] = None, + node_resource_group_profile: Optional["_models.ManagedClusterNodeResourceGroupProfile"] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + enable_namespace_resources: Optional[bool] = None, + network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["_models.ManagedClusterAutoUpgradeProfile"] = None, + upgrade_settings: Optional["_models.ClusterUpgradeSettings"] = None, + auto_scaler_profile: Optional["_models.ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["_models.ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, + private_link_resources: Optional[List["_models.PrivateLinkResource"]] = None, + disable_local_accounts: Optional[bool] = None, + http_proxy_config: Optional["_models.ManagedClusterHTTPProxyConfig"] = None, + security_profile: Optional["_models.ManagedClusterSecurityProfile"] = None, + storage_profile: Optional["_models.ManagedClusterStorageProfile"] = None, + ingress_profile: Optional["_models.ManagedClusterIngressProfile"] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = None, + azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, + guardrails_profile: Optional["_models.GuardrailsProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword sku: The managed cluster SKU. + :paramtype sku: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKU + :keyword extended_location: The extended location of the Virtual Machine. + :paramtype extended_location: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ExtendedLocation + :keyword identity: The identity of the managed cluster, if configured. + :paramtype identity: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterIdentity + :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the + cluster will be created/upgraded using a snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :keyword kubernetes_version: When you upgrade a supported AKS cluster, Kubernetes minor + versions cannot be skipped. All upgrades must be performed sequentially by major version + number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however + 1.14.x -> 1.16.x is not allowed. See `upgrading an AKS cluster + `_ for more details. + :paramtype kubernetes_version: str + :keyword dns_prefix: This cannot be updated once the Managed Cluster has been created. + :paramtype dns_prefix: str + :keyword fqdn_subdomain: This cannot be updated once the Managed Cluster has been created. + :paramtype fqdn_subdomain: str + :keyword agent_pool_profiles: The agent pool properties. + :paramtype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAgentPoolProfile] + :keyword linux_profile: The profile for Linux VMs in the Managed Cluster. + :paramtype linux_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceLinuxProfile + :keyword windows_profile: The profile for Windows VMs in the Managed Cluster. + :paramtype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWindowsProfile + :keyword service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :paramtype service_principal_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterServicePrincipalProfile + :keyword addon_profiles: The profile of managed cluster add-on. + :paramtype addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAddonProfile] + :keyword pod_identity_profile: See `use AAD pod identity + `_ for more details on AAD pod + identity integration. + :paramtype pod_identity_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProfile + :keyword oidc_issuer_profile: The OIDC issuer profile of the Managed Cluster. + :paramtype oidc_issuer_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterOIDCIssuerProfile + :keyword node_resource_group: The name of the resource group containing agent pool nodes. + :paramtype node_resource_group: str + :keyword node_resource_group_profile: The node resource group configuration profile. + :paramtype node_resource_group_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterNodeResourceGroupProfile + :keyword enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :paramtype enable_rbac: bool + :keyword enable_pod_security_policy: (DEPRECATED) Whether to enable Kubernetes pod security + policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from + Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + :paramtype enable_pod_security_policy: bool + :keyword enable_namespace_resources: The default value is false. It can be enabled/disabled on + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource + `_ for more details on Namespace as a ARM Resource. + :paramtype enable_namespace_resources: bool + :keyword network_profile: The network configuration profile. + :paramtype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ContainerServiceNetworkProfile + :keyword aad_profile: The Azure Active Directory configuration. + :paramtype aad_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAADProfile + :keyword auto_upgrade_profile: The auto upgrade configuration. + :paramtype auto_upgrade_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAutoUpgradeProfile + :keyword upgrade_settings: Settings for upgrading a cluster. + :paramtype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ClusterUpgradeSettings + :keyword auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :paramtype auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPropertiesAutoScalerProfile + :keyword api_server_access_profile: The access profile for managed cluster API server. + :paramtype api_server_access_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAPIServerAccessProfile + :keyword disk_encryption_set_id: This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + :paramtype disk_encryption_set_id: str + :keyword identity_profile: Identities associated with the cluster. + :paramtype identity_profile: dict[str, + ~azure.mgmt.containerservice.v2023_01_02_preview.models.UserAssignedIdentity] + :keyword private_link_resources: Private link resources associated with the cluster. + :paramtype private_link_resources: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource] + :keyword disable_local_accounts: If set to true, getting static credentials will be disabled + for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more + details see `disable local accounts + `_. + :paramtype disable_local_accounts: bool + :keyword http_proxy_config: Configurations for provisioning the cluster with HTTP proxy + servers. + :paramtype http_proxy_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterHTTPProxyConfig + :keyword security_profile: Security profile for the managed cluster. + :paramtype security_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfile + :keyword storage_profile: Storage profile for the managed cluster. + :paramtype storage_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfile + :keyword ingress_profile: Ingress profile for the managed cluster. + :paramtype ingress_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterIngressProfile + :keyword public_network_access: Allow or deny public network access for AKS. Known values are: + "Enabled", "Disabled", and "SecuredByPerimeter". + :paramtype public_network_access: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PublicNetworkAccess + :keyword workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. + :paramtype workload_auto_scaler_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfile + :keyword azure_monitor_profile: Prometheus addon profile for the container service cluster. + :paramtype azure_monitor_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAzureMonitorProfile + :keyword guardrails_profile: The guardrails profile holds all the guardrails information for a + given cluster. + :paramtype guardrails_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GuardrailsProfile + """ + super().__init__(tags=tags, location=location, **kwargs) + self.sku = sku + self.extended_location = extended_location + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.creation_data = creation_data + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.current_kubernetes_version = None + self.dns_prefix = dns_prefix + self.fqdn_subdomain = fqdn_subdomain + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.oidc_issuer_profile = oidc_issuer_profile + self.node_resource_group = node_resource_group + self.node_resource_group_profile = node_resource_group_profile + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.enable_namespace_resources = enable_namespace_resources + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.upgrade_settings = upgrade_settings + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + self.private_link_resources = private_link_resources + self.disable_local_accounts = disable_local_accounts + self.http_proxy_config = http_proxy_config + self.security_profile = security_profile + self.storage_profile = storage_profile + self.ingress_profile = ingress_profile + self.public_network_access = public_network_access + self.workload_auto_scaler_profile = workload_auto_scaler_profile + self.azure_monitor_profile = azure_monitor_profile + self.guardrails_profile = guardrails_profile + + +class ManagedClusterAADProfile(_serialization.Model): + """For more details see `managed AAD on AKS `_. + + :ivar managed: Whether to enable managed AAD. + :vartype managed: bool + :ivar enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :vartype enable_azure_rbac: bool + :ivar admin_group_object_i_ds: The list of AAD group object IDs that will have admin role of + the cluster. + :vartype admin_group_object_i_ds: list[str] + :ivar client_app_id: (DEPRECATED) The client AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :vartype client_app_id: str + :ivar server_app_id: (DEPRECATED) The server AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :vartype server_app_id: str + :ivar server_app_secret: (DEPRECATED) The server AAD application secret. Learn more at + https://aka.ms/aks/aad-legacy. + :vartype server_app_secret: str + :ivar tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :vartype tenant_id: str + """ + + _attribute_map = { + "managed": {"key": "managed", "type": "bool"}, + "enable_azure_rbac": {"key": "enableAzureRBAC", "type": "bool"}, + "admin_group_object_i_ds": {"key": "adminGroupObjectIDs", "type": "[str]"}, + "client_app_id": {"key": "clientAppID", "type": "str"}, + "server_app_id": {"key": "serverAppID", "type": "str"}, + "server_app_secret": {"key": "serverAppSecret", "type": "str"}, + "tenant_id": {"key": "tenantID", "type": "str"}, + } + + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword managed: Whether to enable managed AAD. + :paramtype managed: bool + :keyword enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :paramtype enable_azure_rbac: bool + :keyword admin_group_object_i_ds: The list of AAD group object IDs that will have admin role of + the cluster. + :paramtype admin_group_object_i_ds: list[str] + :keyword client_app_id: (DEPRECATED) The client AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :paramtype client_app_id: str + :keyword server_app_id: (DEPRECATED) The server AAD application ID. Learn more at + https://aka.ms/aks/aad-legacy. + :paramtype server_app_id: str + :keyword server_app_secret: (DEPRECATED) The server AAD application secret. Learn more at + https://aka.ms/aks/aad-legacy. + :paramtype server_app_secret: str + :keyword tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :paramtype tenant_id: str + """ + super().__init__(**kwargs) + self.managed = managed + self.enable_azure_rbac = enable_azure_rbac + self.admin_group_object_i_ds = admin_group_object_i_ds + self.client_app_id = client_app_id + self.server_app_id = server_app_id + self.server_app_secret = server_app_secret + self.tenant_id = tenant_id + + +class ManagedClusterAccessProfile(TrackedResource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar kube_config: Base64-encoded Kubernetes configuration file. + :vartype kube_config: bytes + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "kube_config": {"key": "properties.kubeConfig", "type": "bytearray"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytes] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword kube_config: Base64-encoded Kubernetes configuration file. + :paramtype kube_config: bytes + """ + super().__init__(tags=tags, location=location, **kwargs) + self.kube_config = kube_config + + +class ManagedClusterAddonProfile(_serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether the add-on is enabled or not. Required. + :vartype enabled: bool + :ivar config: Key-value pairs for configuring an add-on. + :vartype config: dict[str, str] + :ivar identity: Information of user assigned identity used by this add-on. + :vartype identity: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAddonProfileIdentity + """ + + _validation = { + "enabled": {"required": True}, + "identity": {"readonly": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "config": {"key": "config", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedClusterAddonProfileIdentity"}, + } + + def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether the add-on is enabled or not. Required. + :paramtype enabled: bool + :keyword config: Key-value pairs for configuring an add-on. + :paramtype config: dict[str, str] + """ + super().__init__(**kwargs) + self.enabled = enabled + self.config = config + self.identity = None + + +class UserAssignedIdentity(_serialization.Model): + """Details about a user assigned identity. + + :ivar resource_id: The resource ID of the user assigned identity. + :vartype resource_id: str + :ivar client_id: The client ID of the user assigned identity. + :vartype client_id: str + :ivar object_id: The object ID of the user assigned identity. + :vartype object_id: str + """ + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "object_id": {"key": "objectId", "type": "str"}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword resource_id: The resource ID of the user assigned identity. + :paramtype resource_id: str + :keyword client_id: The client ID of the user assigned identity. + :paramtype client_id: str + :keyword object_id: The object ID of the user assigned identity. + :paramtype object_id: str + """ + super().__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): + """Information of user assigned identity used by this add-on. + + :ivar resource_id: The resource ID of the user assigned identity. + :vartype resource_id: str + :ivar client_id: The client ID of the user assigned identity. + :vartype client_id: str + :ivar object_id: The object ID of the user assigned identity. + :vartype object_id: str + """ + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "object_id": {"key": "objectId", "type": "str"}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword resource_id: The resource ID of the user assigned identity. + :paramtype resource_id: str + :keyword client_id: The client ID of the user assigned identity. + :paramtype client_id: str + :keyword object_id: The object ID of the user assigned identity. + :paramtype object_id: str + """ + super().__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ManagedClusterAgentPoolProfileProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :vartype count: int + :ivar vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :vartype vm_size: str + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :vartype os_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSDiskType + :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletDiskType + :ivar workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". + :vartype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WorkloadRuntime + :ivar message_of_the_day: A base64-encoded string which will be written to /etc/motd after + decoding. This allows customization of the message of the day for Linux nodes. It must not be + specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be + executed as a script). + :vartype message_of_the_day: str + :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnet_subnet_id: str + :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype pod_subnet_id: str + :ivar max_pods: The maximum number of pods that can run on a node. + :vartype max_pods: int + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "CBLMariner", "Mariner", "Windows2019", and "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSSKU + :ivar max_count: The maximum number of nodes for auto-scaling. + :vartype max_count: int + :ivar min_count: The minimum number of nodes for auto-scaling. + :vartype min_count: int + :ivar enable_auto_scaling: Whether to enable auto-scaler. + :vartype enable_auto_scaling: bool + :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Known values are: "Delete" and "Deallocate". + :vartype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleDownMode + :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :vartype type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolType + :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :vartype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolMode + :ivar orchestrator_version: Both patch version and are + supported. When is specified, the latest supported patch version is chosen + automatically. Updating the agent pool with the same once it has been created + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool + `_. + :vartype orchestrator_version: str + :ivar current_orchestrator_version: If orchestratorVersion was a fully specified version + , this field will be exactly equal to it. If orchestratorVersion was + , this field will contain the full version being used. + :vartype current_orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar upgrade_settings: Settings for upgrading the agentpool. + :vartype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PowerState + :ivar availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :vartype availability_zones: list[str] + :ivar enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :vartype enable_node_public_ip: bool + :ivar enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that + the feature is enabled and deploys a daemonset along with host services to sync custom + certificate authorities from user-provided list of base64 encoded certificates into node trust + stores. Defaults to false. + :vartype enable_custom_ca_trust: bool + :ivar node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype node_public_ip_prefix_id: str + :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default + is 'Regular'. Known values are: "Spot" and "Regular". + :vartype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetPriority + :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :vartype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetEvictionPolicy + :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :vartype spot_max_price: float + :ivar tags: The tags to be persisted on the agent pool virtual machine scale set. + :vartype tags: dict[str, str] + :ivar node_labels: The node labels to be persisted across all nodes in agent pool. + :vartype node_labels: dict[str, str] + :ivar node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :vartype node_taints: list[str] + :ivar proximity_placement_group_id: The ID for Proximity Placement Group. + :vartype proximity_placement_group_id: str + :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. + :vartype kubelet_config: ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletConfig + :ivar linux_os_config: The OS configuration of Linux agent nodes. + :vartype linux_os_config: ~azure.mgmt.containerservice.v2023_01_02_preview.models.LinuxOSConfig + :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :vartype enable_encryption_at_host: bool + :ivar enable_ultra_ssd: Whether to enable UltraSSD. + :vartype enable_ultra_ssd: bool + :ivar enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :vartype enable_fips: bool + :ivar gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GPUInstanceProfile + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :ivar capacity_reservation_group_id: AKS will associate the specified agent pool with the + Capacity Reservation Group. + :vartype capacity_reservation_group_id: str + :ivar host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :vartype host_group_id: str + :ivar windows_profile: The Windows agent pool's specific profile. + :vartype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolWindowsProfile + :ivar network_profile: Network-related settings of an agent pool. + :vartype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolNetworkProfile + """ + + _validation = { + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "vm_size": {"key": "vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, + "os_disk_type": {"key": "osDiskType", "type": "str"}, + "kubelet_disk_type": {"key": "kubeletDiskType", "type": "str"}, + "workload_runtime": {"key": "workloadRuntime", "type": "str"}, + "message_of_the_day": {"key": "messageOfTheDay", "type": "str"}, + "vnet_subnet_id": {"key": "vnetSubnetID", "type": "str"}, + "pod_subnet_id": {"key": "podSubnetID", "type": "str"}, + "max_pods": {"key": "maxPods", "type": "int"}, + "os_type": {"key": "osType", "type": "str"}, + "os_sku": {"key": "osSKU", "type": "str"}, + "max_count": {"key": "maxCount", "type": "int"}, + "min_count": {"key": "minCount", "type": "int"}, + "enable_auto_scaling": {"key": "enableAutoScaling", "type": "bool"}, + "scale_down_mode": {"key": "scaleDownMode", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, + "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, + "current_orchestrator_version": {"key": "currentOrchestratorVersion", "type": "str"}, + "node_image_version": {"key": "nodeImageVersion", "type": "str"}, + "upgrade_settings": {"key": "upgradeSettings", "type": "AgentPoolUpgradeSettings"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "power_state": {"key": "powerState", "type": "PowerState"}, + "availability_zones": {"key": "availabilityZones", "type": "[str]"}, + "enable_node_public_ip": {"key": "enableNodePublicIP", "type": "bool"}, + "enable_custom_ca_trust": {"key": "enableCustomCATrust", "type": "bool"}, + "node_public_ip_prefix_id": {"key": "nodePublicIPPrefixID", "type": "str"}, + "scale_set_priority": {"key": "scaleSetPriority", "type": "str"}, + "scale_set_eviction_policy": {"key": "scaleSetEvictionPolicy", "type": "str"}, + "spot_max_price": {"key": "spotMaxPrice", "type": "float"}, + "tags": {"key": "tags", "type": "{str}"}, + "node_labels": {"key": "nodeLabels", "type": "{str}"}, + "node_taints": {"key": "nodeTaints", "type": "[str]"}, + "proximity_placement_group_id": {"key": "proximityPlacementGroupID", "type": "str"}, + "kubelet_config": {"key": "kubeletConfig", "type": "KubeletConfig"}, + "linux_os_config": {"key": "linuxOSConfig", "type": "LinuxOSConfig"}, + "enable_encryption_at_host": {"key": "enableEncryptionAtHost", "type": "bool"}, + "enable_ultra_ssd": {"key": "enableUltraSSD", "type": "bool"}, + "enable_fips": {"key": "enableFIPS", "type": "bool"}, + "gpu_instance_profile": {"key": "gpuInstanceProfile", "type": "str"}, + "creation_data": {"key": "creationData", "type": "CreationData"}, + "capacity_reservation_group_id": {"key": "capacityReservationGroupID", "type": "str"}, + "host_group_id": {"key": "hostGroupID", "type": "str"}, + "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, + "network_profile": {"key": "networkProfile", "type": "AgentPoolNetworkProfile"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, + message_of_the_day: Optional[str] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Union[str, "_models.OSType"] = "Linux", + os_sku: Optional[Union[str, "_models.OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "_models.ScaleDownMode"]] = None, + type: Optional[Union[str, "_models.AgentPoolType"]] = None, + mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + power_state: Optional["_models.PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + enable_custom_ca_trust: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", + scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", + spot_max_price: float = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["_models.KubeletConfig"] = None, + linux_os_config: Optional["_models.LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, + creation_data: Optional["_models.CreationData"] = None, + capacity_reservation_group_id: Optional[str] = None, + host_group_id: Optional[str] = None, + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, + network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :paramtype count: int + :keyword vm_size: VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :paramtype vm_size: str + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :paramtype os_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSDiskType + :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime + data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :paramtype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletDiskType + :keyword workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". + :paramtype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WorkloadRuntime + :keyword message_of_the_day: A base64-encoded string which will be written to /etc/motd after + decoding. This allows customization of the message of the day for Linux nodes. It must not be + specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be + executed as a script). + :paramtype message_of_the_day: str + :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and + used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to + just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype vnet_subnet_id: str + :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype pod_subnet_id: str + :keyword max_pods: The maximum number of pods that can run on a node. + :paramtype max_pods: int + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "CBLMariner", "Mariner", "Windows2019", and "Windows2022". + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSSKU + :keyword max_count: The maximum number of nodes for auto-scaling. + :paramtype max_count: int + :keyword min_count: The minimum number of nodes for auto-scaling. + :paramtype min_count: int + :keyword enable_auto_scaling: Whether to enable auto-scaler. + :paramtype enable_auto_scaling: bool + :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, + it defaults to Delete. Known values are: "Delete" and "Deallocate". + :paramtype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleDownMode + :keyword type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :paramtype type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolType + :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For + additional information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :paramtype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolMode + :keyword orchestrator_version: Both patch version and are + supported. When is specified, the latest supported patch version is chosen + automatically. Updating the agent pool with the same once it has been created + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool + `_. + :paramtype orchestrator_version: str + :keyword upgrade_settings: Settings for upgrading the agentpool. + :paramtype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeSettings + :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent + Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs + and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :paramtype power_state: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PowerState + :keyword availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :paramtype availability_zones: list[str] + :keyword enable_node_public_ip: Some scenarios may require nodes in a node pool to receive + their own dedicated public IP addresses. A common scenario is for gaming workloads, where a + console needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :paramtype enable_node_public_ip: bool + :keyword enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that + the feature is enabled and deploys a daemonset along with host services to sync custom + certificate authorities from user-provided list of base64 encoded certificates into node trust + stores. Defaults to false. + :paramtype enable_custom_ca_trust: bool + :keyword node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :paramtype node_public_ip_prefix_id: str + :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Known values are: "Spot" and "Regular". + :paramtype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetPriority + :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :paramtype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetEvictionPolicy + :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :paramtype spot_max_price: float + :keyword tags: The tags to be persisted on the agent pool virtual machine scale set. + :paramtype tags: dict[str, str] + :keyword node_labels: The node labels to be persisted across all nodes in agent pool. + :paramtype node_labels: dict[str, str] + :keyword node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :paramtype node_taints: list[str] + :keyword proximity_placement_group_id: The ID for Proximity Placement Group. + :paramtype proximity_placement_group_id: str + :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. + :paramtype kubelet_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletConfig + :keyword linux_os_config: The OS configuration of Linux agent nodes. + :paramtype linux_os_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LinuxOSConfig + :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :paramtype enable_encryption_at_host: bool + :keyword enable_ultra_ssd: Whether to enable UltraSSD. + :paramtype enable_ultra_ssd: bool + :keyword enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :paramtype enable_fips: bool + :keyword gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance + profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and + "MIG7g". + :paramtype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GPUInstanceProfile + :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :keyword capacity_reservation_group_id: AKS will associate the specified agent pool with the + Capacity Reservation Group. + :paramtype capacity_reservation_group_id: str + :keyword host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :paramtype host_group_id: str + :keyword windows_profile: The Windows agent pool's specific profile. + :paramtype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolWindowsProfile + :keyword network_profile: Network-related settings of an agent pool. + :paramtype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolNetworkProfile + """ + super().__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.kubelet_disk_type = kubelet_disk_type + self.workload_runtime = workload_runtime + self.message_of_the_day = message_of_the_day + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.os_sku = os_sku + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.scale_down_mode = scale_down_mode + self.type = type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.current_orchestrator_version = None + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = power_state + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.enable_custom_ca_trust = enable_custom_ca_trust + self.node_public_ip_prefix_id = node_public_ip_prefix_id + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + self.enable_encryption_at_host = enable_encryption_at_host + self.enable_ultra_ssd = enable_ultra_ssd + self.enable_fips = enable_fips + self.gpu_instance_profile = gpu_instance_profile + self.creation_data = creation_data + self.capacity_reservation_group_id = capacity_reservation_group_id + self.host_group_id = host_group_id + self.windows_profile = windows_profile + self.network_profile = network_profile + + +class ManagedClusterAgentPoolProfile( + ManagedClusterAgentPoolProfileProperties +): # pylint: disable=too-many-instance-attributes + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :vartype count: int + :ivar vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :vartype vm_size: str + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :vartype os_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSDiskType + :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletDiskType + :ivar workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". + :vartype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WorkloadRuntime + :ivar message_of_the_day: A base64-encoded string which will be written to /etc/motd after + decoding. This allows customization of the message of the day for Linux nodes. It must not be + specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be + executed as a script). + :vartype message_of_the_day: str + :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnet_subnet_id: str + :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype pod_subnet_id: str + :ivar max_pods: The maximum number of pods that can run on a node. + :vartype max_pods: int + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "CBLMariner", "Mariner", "Windows2019", and "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSSKU + :ivar max_count: The maximum number of nodes for auto-scaling. + :vartype max_count: int + :ivar min_count: The minimum number of nodes for auto-scaling. + :vartype min_count: int + :ivar enable_auto_scaling: Whether to enable auto-scaler. + :vartype enable_auto_scaling: bool + :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Known values are: "Delete" and "Deallocate". + :vartype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleDownMode + :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :vartype type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolType + :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :vartype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolMode + :ivar orchestrator_version: Both patch version and are + supported. When is specified, the latest supported patch version is chosen + automatically. Updating the agent pool with the same once it has been created + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool + `_. + :vartype orchestrator_version: str + :ivar current_orchestrator_version: If orchestratorVersion was a fully specified version + , this field will be exactly equal to it. If orchestratorVersion was + , this field will contain the full version being used. + :vartype current_orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar upgrade_settings: Settings for upgrading the agentpool. + :vartype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :vartype power_state: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PowerState + :ivar availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :vartype availability_zones: list[str] + :ivar enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :vartype enable_node_public_ip: bool + :ivar enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that + the feature is enabled and deploys a daemonset along with host services to sync custom + certificate authorities from user-provided list of base64 encoded certificates into node trust + stores. Defaults to false. + :vartype enable_custom_ca_trust: bool + :ivar node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype node_public_ip_prefix_id: str + :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default + is 'Regular'. Known values are: "Spot" and "Regular". + :vartype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetPriority + :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :vartype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetEvictionPolicy + :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :vartype spot_max_price: float + :ivar tags: The tags to be persisted on the agent pool virtual machine scale set. + :vartype tags: dict[str, str] + :ivar node_labels: The node labels to be persisted across all nodes in agent pool. + :vartype node_labels: dict[str, str] + :ivar node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :vartype node_taints: list[str] + :ivar proximity_placement_group_id: The ID for Proximity Placement Group. + :vartype proximity_placement_group_id: str + :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. + :vartype kubelet_config: ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletConfig + :ivar linux_os_config: The OS configuration of Linux agent nodes. + :vartype linux_os_config: ~azure.mgmt.containerservice.v2023_01_02_preview.models.LinuxOSConfig + :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :vartype enable_encryption_at_host: bool + :ivar enable_ultra_ssd: Whether to enable UltraSSD. + :vartype enable_ultra_ssd: bool + :ivar enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :vartype enable_fips: bool + :ivar gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GPUInstanceProfile + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :ivar capacity_reservation_group_id: AKS will associate the specified agent pool with the + Capacity Reservation Group. + :vartype capacity_reservation_group_id: str + :ivar host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :vartype host_group_id: str + :ivar windows_profile: The Windows agent pool's specific profile. + :vartype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolWindowsProfile + :ivar network_profile: Network-related settings of an agent pool. + :vartype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolNetworkProfile + :ivar name: Windows agent pool names must be 6 characters or less. Required. + :vartype name: str + """ + + _validation = { + "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, + "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "name": {"required": True, "pattern": r"^[a-z][a-z0-9]{0,11}$"}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "vm_size": {"key": "vmSize", "type": "str"}, + "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, + "os_disk_type": {"key": "osDiskType", "type": "str"}, + "kubelet_disk_type": {"key": "kubeletDiskType", "type": "str"}, + "workload_runtime": {"key": "workloadRuntime", "type": "str"}, + "message_of_the_day": {"key": "messageOfTheDay", "type": "str"}, + "vnet_subnet_id": {"key": "vnetSubnetID", "type": "str"}, + "pod_subnet_id": {"key": "podSubnetID", "type": "str"}, + "max_pods": {"key": "maxPods", "type": "int"}, + "os_type": {"key": "osType", "type": "str"}, + "os_sku": {"key": "osSKU", "type": "str"}, + "max_count": {"key": "maxCount", "type": "int"}, + "min_count": {"key": "minCount", "type": "int"}, + "enable_auto_scaling": {"key": "enableAutoScaling", "type": "bool"}, + "scale_down_mode": {"key": "scaleDownMode", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, + "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, + "current_orchestrator_version": {"key": "currentOrchestratorVersion", "type": "str"}, + "node_image_version": {"key": "nodeImageVersion", "type": "str"}, + "upgrade_settings": {"key": "upgradeSettings", "type": "AgentPoolUpgradeSettings"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "power_state": {"key": "powerState", "type": "PowerState"}, + "availability_zones": {"key": "availabilityZones", "type": "[str]"}, + "enable_node_public_ip": {"key": "enableNodePublicIP", "type": "bool"}, + "enable_custom_ca_trust": {"key": "enableCustomCATrust", "type": "bool"}, + "node_public_ip_prefix_id": {"key": "nodePublicIPPrefixID", "type": "str"}, + "scale_set_priority": {"key": "scaleSetPriority", "type": "str"}, + "scale_set_eviction_policy": {"key": "scaleSetEvictionPolicy", "type": "str"}, + "spot_max_price": {"key": "spotMaxPrice", "type": "float"}, + "tags": {"key": "tags", "type": "{str}"}, + "node_labels": {"key": "nodeLabels", "type": "{str}"}, + "node_taints": {"key": "nodeTaints", "type": "[str]"}, + "proximity_placement_group_id": {"key": "proximityPlacementGroupID", "type": "str"}, + "kubelet_config": {"key": "kubeletConfig", "type": "KubeletConfig"}, + "linux_os_config": {"key": "linuxOSConfig", "type": "LinuxOSConfig"}, + "enable_encryption_at_host": {"key": "enableEncryptionAtHost", "type": "bool"}, + "enable_ultra_ssd": {"key": "enableUltraSSD", "type": "bool"}, + "enable_fips": {"key": "enableFIPS", "type": "bool"}, + "gpu_instance_profile": {"key": "gpuInstanceProfile", "type": "str"}, + "creation_data": {"key": "creationData", "type": "CreationData"}, + "capacity_reservation_group_id": {"key": "capacityReservationGroupID", "type": "str"}, + "host_group_id": {"key": "hostGroupID", "type": "str"}, + "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, + "network_profile": {"key": "networkProfile", "type": "AgentPoolNetworkProfile"}, + "name": {"key": "name", "type": "str"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, + message_of_the_day: Optional[str] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Union[str, "_models.OSType"] = "Linux", + os_sku: Optional[Union[str, "_models.OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "_models.ScaleDownMode"]] = None, + type: Optional[Union[str, "_models.AgentPoolType"]] = None, + mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + power_state: Optional["_models.PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + enable_custom_ca_trust: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Union[str, "_models.ScaleSetPriority"] = "Regular", + scale_set_eviction_policy: Union[str, "_models.ScaleSetEvictionPolicy"] = "Delete", + spot_max_price: float = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["_models.KubeletConfig"] = None, + linux_os_config: Optional["_models.LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, + creation_data: Optional["_models.CreationData"] = None, + capacity_reservation_group_id: Optional[str] = None, + host_group_id: Optional[str] = None, + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, + network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :paramtype count: int + :keyword vm_size: VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :paramtype vm_size: str + :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :paramtype os_disk_size_gb: int + :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Known values are: + "Managed" and "Ephemeral". + :paramtype os_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSDiskType + :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime + data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :paramtype kubelet_disk_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletDiskType + :keyword workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". + :paramtype workload_runtime: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WorkloadRuntime + :keyword message_of_the_day: A base64-encoded string which will be written to /etc/motd after + decoding. This allows customization of the message of the day for Linux nodes. It must not be + specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be + executed as a script). + :paramtype message_of_the_day: str + :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and + used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to + just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype vnet_subnet_id: str + :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :paramtype pod_subnet_id: str + :keyword max_pods: The maximum number of pods that can run on a node. + :paramtype max_pods: int + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "CBLMariner", "Mariner", "Windows2019", and "Windows2022". + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSSKU + :keyword max_count: The maximum number of nodes for auto-scaling. + :paramtype max_count: int + :keyword min_count: The minimum number of nodes for auto-scaling. + :paramtype min_count: int + :keyword enable_auto_scaling: Whether to enable auto-scaler. + :paramtype enable_auto_scaling: bool + :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, + it defaults to Delete. Known values are: "Delete" and "Deallocate". + :paramtype scale_down_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleDownMode + :keyword type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and + "AvailabilitySet". + :paramtype type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolType + :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For + additional information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System" and "User". + :paramtype mode: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolMode + :keyword orchestrator_version: Both patch version and are + supported. When is specified, the latest supported patch version is chosen + automatically. Updating the agent pool with the same once it has been created + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool + `_. + :paramtype orchestrator_version: str + :keyword upgrade_settings: Settings for upgrading the agentpool. + :paramtype upgrade_settings: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeSettings + :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent + Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs + and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :paramtype power_state: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PowerState + :keyword availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :paramtype availability_zones: list[str] + :keyword enable_node_public_ip: Some scenarios may require nodes in a node pool to receive + their own dedicated public IP addresses. A common scenario is for gaming workloads, where a + console needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :paramtype enable_node_public_ip: bool + :keyword enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that + the feature is enabled and deploys a daemonset along with host services to sync custom + certificate authorities from user-provided list of base64 encoded certificates into node trust + stores. Defaults to false. + :paramtype enable_custom_ca_trust: bool + :keyword node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :paramtype node_public_ip_prefix_id: str + :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Known values are: "Spot" and "Regular". + :paramtype scale_set_priority: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetPriority + :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". + :paramtype scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ScaleSetEvictionPolicy + :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :paramtype spot_max_price: float + :keyword tags: The tags to be persisted on the agent pool virtual machine scale set. + :paramtype tags: dict[str, str] + :keyword node_labels: The node labels to be persisted across all nodes in agent pool. + :paramtype node_labels: dict[str, str] + :keyword node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :paramtype node_taints: list[str] + :keyword proximity_placement_group_id: The ID for Proximity Placement Group. + :paramtype proximity_placement_group_id: str + :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. + :paramtype kubelet_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.KubeletConfig + :keyword linux_os_config: The OS configuration of Linux agent nodes. + :paramtype linux_os_config: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LinuxOSConfig + :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :paramtype enable_encryption_at_host: bool + :keyword enable_ultra_ssd: Whether to enable UltraSSD. + :paramtype enable_ultra_ssd: bool + :keyword enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :paramtype enable_fips: bool + :keyword gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance + profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and + "MIG7g". + :paramtype gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.GPUInstanceProfile + :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :keyword capacity_reservation_group_id: AKS will associate the specified agent pool with the + Capacity Reservation Group. + :paramtype capacity_reservation_group_id: str + :keyword host_group_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + For more information see `Azure dedicated hosts + `_. + :paramtype host_group_id: str + :keyword windows_profile: The Windows agent pool's specific profile. + :paramtype windows_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolWindowsProfile + :keyword network_profile: Network-related settings of an agent pool. + :paramtype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolNetworkProfile + :keyword name: Windows agent pool names must be 6 characters or less. Required. + :paramtype name: str + """ + super().__init__( + count=count, + vm_size=vm_size, + os_disk_size_gb=os_disk_size_gb, + os_disk_type=os_disk_type, + kubelet_disk_type=kubelet_disk_type, + workload_runtime=workload_runtime, + message_of_the_day=message_of_the_day, + vnet_subnet_id=vnet_subnet_id, + pod_subnet_id=pod_subnet_id, + max_pods=max_pods, + os_type=os_type, + os_sku=os_sku, + max_count=max_count, + min_count=min_count, + enable_auto_scaling=enable_auto_scaling, + scale_down_mode=scale_down_mode, + type=type, + mode=mode, + orchestrator_version=orchestrator_version, + upgrade_settings=upgrade_settings, + power_state=power_state, + availability_zones=availability_zones, + enable_node_public_ip=enable_node_public_ip, + enable_custom_ca_trust=enable_custom_ca_trust, + node_public_ip_prefix_id=node_public_ip_prefix_id, + scale_set_priority=scale_set_priority, + scale_set_eviction_policy=scale_set_eviction_policy, + spot_max_price=spot_max_price, + tags=tags, + node_labels=node_labels, + node_taints=node_taints, + proximity_placement_group_id=proximity_placement_group_id, + kubelet_config=kubelet_config, + linux_os_config=linux_os_config, + enable_encryption_at_host=enable_encryption_at_host, + enable_ultra_ssd=enable_ultra_ssd, + enable_fips=enable_fips, + gpu_instance_profile=gpu_instance_profile, + creation_data=creation_data, + capacity_reservation_group_id=capacity_reservation_group_id, + host_group_id=host_group_id, + windows_profile=windows_profile, + network_profile=network_profile, + **kwargs + ) + self.name = name + + +class ManagedClusterAPIServerAccessProfile(_serialization.Model): + """Access profile for managed cluster API server. + + :ivar authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + This feature is not compatible with clusters that use Public IP Per Node, or clusters that are + using a Basic Load Balancer. For more information see `API server authorized IP ranges + `_. + :vartype authorized_ip_ranges: list[str] + :ivar enable_private_cluster: For more details, see `Creating a private AKS cluster + `_. + :vartype enable_private_cluster: bool + :ivar private_dns_zone: The default is System. For more details see `configure private DNS zone + `_. Allowed + values are 'system' and 'none'. + :vartype private_dns_zone: str + :ivar enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. + :vartype enable_private_cluster_public_fqdn: bool + :ivar disable_run_command: Whether to disable run command for the cluster or not. + :vartype disable_run_command: bool + :ivar enable_vnet_integration: Whether to enable apiserver vnet integration for the cluster or + not. + :vartype enable_vnet_integration: bool + :ivar subnet_id: It is required when: 1. creating a new cluster with BYO Vnet; 2. updating an + existing cluster to enable apiserver vnet integration. + :vartype subnet_id: str + """ + + _attribute_map = { + "authorized_ip_ranges": {"key": "authorizedIPRanges", "type": "[str]"}, + "enable_private_cluster": {"key": "enablePrivateCluster", "type": "bool"}, + "private_dns_zone": {"key": "privateDNSZone", "type": "str"}, + "enable_private_cluster_public_fqdn": {"key": "enablePrivateClusterPublicFQDN", "type": "bool"}, + "disable_run_command": {"key": "disableRunCommand", "type": "bool"}, + "enable_vnet_integration": {"key": "enableVnetIntegration", "type": "bool"}, + "subnet_id": {"key": "subnetId", "type": "str"}, + } + + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + enable_private_cluster_public_fqdn: Optional[bool] = None, + disable_run_command: Optional[bool] = None, + enable_vnet_integration: Optional[bool] = None, + subnet_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + This feature is not compatible with clusters that use Public IP Per Node, or clusters that are + using a Basic Load Balancer. For more information see `API server authorized IP ranges + `_. + :paramtype authorized_ip_ranges: list[str] + :keyword enable_private_cluster: For more details, see `Creating a private AKS cluster + `_. + :paramtype enable_private_cluster: bool + :keyword private_dns_zone: The default is System. For more details see `configure private DNS + zone `_. + Allowed values are 'system' and 'none'. + :paramtype private_dns_zone: str + :keyword enable_private_cluster_public_fqdn: Whether to create additional public FQDN for + private cluster or not. + :paramtype enable_private_cluster_public_fqdn: bool + :keyword disable_run_command: Whether to disable run command for the cluster or not. + :paramtype disable_run_command: bool + :keyword enable_vnet_integration: Whether to enable apiserver vnet integration for the cluster + or not. + :paramtype enable_vnet_integration: bool + :keyword subnet_id: It is required when: 1. creating a new cluster with BYO Vnet; 2. updating + an existing cluster to enable apiserver vnet integration. + :paramtype subnet_id: str + """ + super().__init__(**kwargs) + self.authorized_ip_ranges = authorized_ip_ranges + self.enable_private_cluster = enable_private_cluster + self.private_dns_zone = private_dns_zone + self.enable_private_cluster_public_fqdn = enable_private_cluster_public_fqdn + self.disable_run_command = disable_run_command + self.enable_vnet_integration = enable_vnet_integration + self.subnet_id = subnet_id + + +class ManagedClusterAutoUpgradeProfile(_serialization.Model): + """Auto upgrade profile for a managed cluster. + + :ivar upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel + `_. Known values + are: "rapid", "stable", "patch", "node-image", and "none". + :vartype upgrade_channel: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.UpgradeChannel + :ivar node_os_upgrade_channel: The default is Unmanaged, but may change to either NodeImage or + SecurityPatch at GA. Known values are: "None", "Unmanaged", "SecurityPatch", and "NodeImage". + :vartype node_os_upgrade_channel: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NodeOSUpgradeChannel + """ + + _attribute_map = { + "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, + "node_os_upgrade_channel": {"key": "nodeOSUpgradeChannel", "type": "str"}, + } + + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, + node_os_upgrade_channel: Optional[Union[str, "_models.NodeOSUpgradeChannel"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword upgrade_channel: For more information see `setting the AKS cluster auto-upgrade + channel `_. + Known values are: "rapid", "stable", "patch", "node-image", and "none". + :paramtype upgrade_channel: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.UpgradeChannel + :keyword node_os_upgrade_channel: The default is Unmanaged, but may change to either NodeImage + or SecurityPatch at GA. Known values are: "None", "Unmanaged", "SecurityPatch", and + "NodeImage". + :paramtype node_os_upgrade_channel: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NodeOSUpgradeChannel + """ + super().__init__(**kwargs) + self.upgrade_channel = upgrade_channel + self.node_os_upgrade_channel = node_os_upgrade_channel + + +class ManagedClusterAzureMonitorProfile(_serialization.Model): + """Prometheus addon profile for the container service cluster. + + :ivar metrics: Metrics profile for the prometheus service addon. + :vartype metrics: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAzureMonitorProfileMetrics + """ + + _attribute_map = { + "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, + } + + def __init__( + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any + ) -> None: + """ + :keyword metrics: Metrics profile for the prometheus service addon. + :paramtype metrics: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAzureMonitorProfileMetrics + """ + super().__init__(**kwargs) + self.metrics = metrics + + +class ManagedClusterAzureMonitorProfileKubeStateMetrics(_serialization.Model): + """Kube State Metrics for prometheus addon profile for the container service cluster. + + :ivar metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be + used in the resource's labels metric. + :vartype metric_labels_allowlist: str + :ivar metric_annotations_allow_list: Comma-separated list of additional Kubernetes label keys + that will be used in the resource's labels metric. + :vartype metric_annotations_allow_list: str + """ + + _attribute_map = { + "metric_labels_allowlist": {"key": "metricLabelsAllowlist", "type": "str"}, + "metric_annotations_allow_list": {"key": "metricAnnotationsAllowList", "type": "str"}, + } + + def __init__( + self, + *, + metric_labels_allowlist: Optional[str] = None, + metric_annotations_allow_list: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will + be used in the resource's labels metric. + :paramtype metric_labels_allowlist: str + :keyword metric_annotations_allow_list: Comma-separated list of additional Kubernetes label + keys that will be used in the resource's labels metric. + :paramtype metric_annotations_allow_list: str + """ + super().__init__(**kwargs) + self.metric_labels_allowlist = metric_labels_allowlist + self.metric_annotations_allow_list = metric_annotations_allow_list + + +class ManagedClusterAzureMonitorProfileMetrics(_serialization.Model): + """Metrics profile for the prometheus service addon. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether to enable the Prometheus collector. Required. + :vartype enabled: bool + :ivar kube_state_metrics: Kube State Metrics for prometheus addon profile for the container + service cluster. + :vartype kube_state_metrics: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAzureMonitorProfileKubeStateMetrics + """ + + _validation = { + "enabled": {"required": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "kube_state_metrics": {"key": "kubeStateMetrics", "type": "ManagedClusterAzureMonitorProfileKubeStateMetrics"}, + } + + def __init__( + self, + *, + enabled: bool, + kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether to enable the Prometheus collector. Required. + :paramtype enabled: bool + :keyword kube_state_metrics: Kube State Metrics for prometheus addon profile for the container + service cluster. + :paramtype kube_state_metrics: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAzureMonitorProfileKubeStateMetrics + """ + super().__init__(**kwargs) + self.enabled = enabled + self.kube_state_metrics = kube_state_metrics + + +class ManagedClusterHTTPProxyConfig(_serialization.Model): + """Cluster HTTP proxy configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar http_proxy: The HTTP proxy server endpoint to use. + :vartype http_proxy: str + :ivar https_proxy: The HTTPS proxy server endpoint to use. + :vartype https_proxy: str + :ivar no_proxy: The endpoints that should not go through proxy. + :vartype no_proxy: list[str] + :ivar effective_no_proxy: A read-only list of all endpoints for which traffic should not be + sent to the proxy. This list is a superset of noProxy and values injected by AKS. + :vartype effective_no_proxy: list[str] + :ivar trusted_ca: Alternative CA cert to use for connecting to proxy servers. + :vartype trusted_ca: str + """ + + _validation = { + "effective_no_proxy": {"readonly": True}, + } + + _attribute_map = { + "http_proxy": {"key": "httpProxy", "type": "str"}, + "https_proxy": {"key": "httpsProxy", "type": "str"}, + "no_proxy": {"key": "noProxy", "type": "[str]"}, + "effective_no_proxy": {"key": "effectiveNoProxy", "type": "[str]"}, + "trusted_ca": {"key": "trustedCa", "type": "str"}, + } + + def __init__( + self, + *, + http_proxy: Optional[str] = None, + https_proxy: Optional[str] = None, + no_proxy: Optional[List[str]] = None, + trusted_ca: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword http_proxy: The HTTP proxy server endpoint to use. + :paramtype http_proxy: str + :keyword https_proxy: The HTTPS proxy server endpoint to use. + :paramtype https_proxy: str + :keyword no_proxy: The endpoints that should not go through proxy. + :paramtype no_proxy: list[str] + :keyword trusted_ca: Alternative CA cert to use for connecting to proxy servers. + :paramtype trusted_ca: str + """ + super().__init__(**kwargs) + self.http_proxy = http_proxy + self.https_proxy = https_proxy + self.no_proxy = no_proxy + self.effective_no_proxy = None + self.trusted_ca = trusted_ca + + +class ManagedClusterIdentity(_serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :ivar type: For more information see `use managed identities in AKS + `_. Known values are: + "SystemAssigned", "UserAssigned", and "None". + :vartype type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceIdentityType + :ivar user_assigned_identities: The keys must be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": { + "key": "userAssignedIdentities", + "type": "{ManagedServiceIdentityUserAssignedIdentitiesValue}", + }, + } + + def __init__( + self, + *, + type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, + user_assigned_identities: Optional[ + Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentitiesValue"] + ] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: For more information see `use managed identities in AKS + `_. Known values are: + "SystemAssigned", "UserAssigned", and "None". + :paramtype type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceIdentityType + :keyword user_assigned_identities: The keys must be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :paramtype user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + super().__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ManagedClusterIngressProfile(_serialization.Model): + """Ingress profile for the container service cluster. + + :ivar web_app_routing: Web App Routing settings for the ingress profile. + :vartype web_app_routing: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterIngressProfileWebAppRouting + """ + + _attribute_map = { + "web_app_routing": {"key": "webAppRouting", "type": "ManagedClusterIngressProfileWebAppRouting"}, + } + + def __init__( + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any + ) -> None: + """ + :keyword web_app_routing: Web App Routing settings for the ingress profile. + :paramtype web_app_routing: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterIngressProfileWebAppRouting + """ + super().__init__(**kwargs) + self.web_app_routing = web_app_routing + + +class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): + """Web App Routing settings for the ingress profile. + + :ivar enabled: Whether to enable Web App Routing. + :vartype enabled: bool + :ivar dns_zone_resource_id: Resource ID of the DNS Zone to be associated with the web app. Used + only when Web App Routing is enabled. + :vartype dns_zone_resource_id: str + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "dns_zone_resource_id": {"key": "dnsZoneResourceId", "type": "str"}, + } + + def __init__( + self, *, enabled: Optional[bool] = None, dns_zone_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether to enable Web App Routing. + :paramtype enabled: bool + :keyword dns_zone_resource_id: Resource ID of the DNS Zone to be associated with the web app. + Used only when Web App Routing is enabled. + :paramtype dns_zone_resource_id: str + """ + super().__init__(**kwargs) + self.enabled = enabled + self.dns_zone_resource_id = dns_zone_resource_id + + +class ManagedClusterListResult(_serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of managed clusters. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[ManagedCluster]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of managed clusters. + :paramtype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class ManagedClusterLoadBalancerProfile(_serialization.Model): + """Profile of the managed cluster load balancer. + + :ivar managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :vartype managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :ivar outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load balancer. + :vartype outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :ivar outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :vartype outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPs + :ivar effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :vartype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + :ivar allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed + values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in + Azure dynamically allocating ports. + :vartype allocated_outbound_ports: int + :ivar idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :vartype idle_timeout_in_minutes: int + :ivar enable_multiple_standard_load_balancers: Enable multiple standard load balancers per AKS + cluster or not. + :vartype enable_multiple_standard_load_balancers: bool + :ivar backend_pool_type: The type of the managed inbound Load Balancer BackendPool. Known + values are: "NodeIPConfiguration" and "NodeIP". + :vartype backend_pool_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.BackendPoolType + """ + + _validation = { + "allocated_outbound_ports": {"maximum": 64000, "minimum": 0}, + "idle_timeout_in_minutes": {"maximum": 120, "minimum": 4}, + } + + _attribute_map = { + "managed_outbound_i_ps": { + "key": "managedOutboundIPs", + "type": "ManagedClusterLoadBalancerProfileManagedOutboundIPs", + }, + "outbound_ip_prefixes": { + "key": "outboundIPPrefixes", + "type": "ManagedClusterLoadBalancerProfileOutboundIPPrefixes", + }, + "outbound_i_ps": {"key": "outboundIPs", "type": "ManagedClusterLoadBalancerProfileOutboundIPs"}, + "effective_outbound_i_ps": {"key": "effectiveOutboundIPs", "type": "[ResourceReference]"}, + "allocated_outbound_ports": {"key": "allocatedOutboundPorts", "type": "int"}, + "idle_timeout_in_minutes": {"key": "idleTimeoutInMinutes", "type": "int"}, + "enable_multiple_standard_load_balancers": {"key": "enableMultipleStandardLoadBalancers", "type": "bool"}, + "backend_pool_type": {"key": "backendPoolType", "type": "str"}, + } + + def __init__( + self, + *, + managed_outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, + allocated_outbound_ports: int = 0, + idle_timeout_in_minutes: int = 30, + enable_multiple_standard_load_balancers: Optional[bool] = None, + backend_pool_type: Union[str, "_models.BackendPoolType"] = "NodeIPConfiguration", + **kwargs: Any + ) -> None: + """ + :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :paramtype managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :keyword outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. + :paramtype outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :keyword outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :paramtype outbound_i_ps: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPs + :keyword effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :paramtype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + :keyword allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed + values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in + Azure dynamically allocating ports. + :paramtype allocated_outbound_ports: int + :keyword idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :paramtype idle_timeout_in_minutes: int + :keyword enable_multiple_standard_load_balancers: Enable multiple standard load balancers per + AKS cluster or not. + :paramtype enable_multiple_standard_load_balancers: bool + :keyword backend_pool_type: The type of the managed inbound Load Balancer BackendPool. Known + values are: "NodeIPConfiguration" and "NodeIP". + :paramtype backend_pool_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.BackendPoolType + """ + super().__init__(**kwargs) + self.managed_outbound_i_ps = managed_outbound_i_ps + self.outbound_ip_prefixes = outbound_ip_prefixes + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps + self.allocated_outbound_ports = allocated_outbound_ports + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_multiple_standard_load_balancers = enable_multiple_standard_load_balancers + self.backend_pool_type = backend_pool_type + + +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): + """Desired managed outbound IPs for the cluster load balancer. + + :ivar count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster + load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value + is 1. + :vartype count: int + :ivar count_ipv6: The desired number of IPv6 outbound IPs created/managed by Azure for the + cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 0 for single-stack and 1 for dual-stack. + :vartype count_ipv6: int + """ + + _validation = { + "count": {"maximum": 100, "minimum": 1}, + "count_ipv6": {"maximum": 100, "minimum": 0}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + "count_ipv6": {"key": "countIPv6", "type": "int"}, + } + + def __init__(self, *, count: int = 1, count_ipv6: int = 0, **kwargs: Any) -> None: + """ + :keyword count: The desired number of IPv4 outbound IPs created/managed by Azure for the + cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 1. + :paramtype count: int + :keyword count_ipv6: The desired number of IPv6 outbound IPs created/managed by Azure for the + cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 0 for single-stack and 1 for dual-stack. + :paramtype count_ipv6: int + """ + super().__init__(**kwargs) + self.count = count + self.count_ipv6 = count_ipv6 + + +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): + """Desired outbound IP Prefix resources for the cluster load balancer. + + :ivar public_ip_prefixes: A list of public IP prefix resources. + :vartype public_ip_prefixes: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + """ + + _attribute_map = { + "public_ip_prefixes": {"key": "publicIPPrefixes", "type": "[ResourceReference]"}, + } + + def __init__( + self, *, public_ip_prefixes: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any + ) -> None: + """ + :keyword public_ip_prefixes: A list of public IP prefix resources. + :paramtype public_ip_prefixes: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + """ + super().__init__(**kwargs) + self.public_ip_prefixes = public_ip_prefixes + + +class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): + """Desired outbound IP resources for the cluster load balancer. + + :ivar public_i_ps: A list of public IP resources. + :vartype public_i_ps: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + """ + + _attribute_map = { + "public_i_ps": {"key": "publicIPs", "type": "[ResourceReference]"}, + } + + def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = None, **kwargs: Any) -> None: + """ + :keyword public_i_ps: A list of public IP resources. + :paramtype public_i_ps: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + """ + super().__init__(**kwargs) + self.public_i_ps = public_i_ps + + +class ManagedClusterManagedOutboundIPProfile(_serialization.Model): + """Profile of the managed outbound IP resources of the managed cluster. + + :ivar count: The desired number of outbound IPs created/managed by Azure. Allowed values must + be in the range of 1 to 16 (inclusive). The default value is 1. + :vartype count: int + """ + + _validation = { + "count": {"maximum": 16, "minimum": 1}, + } + + _attribute_map = { + "count": {"key": "count", "type": "int"}, + } + + def __init__(self, *, count: int = 1, **kwargs: Any) -> None: + """ + :keyword count: The desired number of outbound IPs created/managed by Azure. Allowed values + must be in the range of 1 to 16 (inclusive). The default value is 1. + :paramtype count: int + """ + super().__init__(**kwargs) + self.count = count + + +class ManagedClusterNATGatewayProfile(_serialization.Model): + """Profile of the managed cluster NAT gateway. + + :ivar managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster + NAT gateway. + :vartype managed_outbound_ip_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterManagedOutboundIPProfile + :ivar effective_outbound_i_ps: The effective outbound IP resources of the cluster NAT gateway. + :vartype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + :ivar idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 4 minutes. + :vartype idle_timeout_in_minutes: int + """ + + _validation = { + "idle_timeout_in_minutes": {"maximum": 120, "minimum": 4}, + } + + _attribute_map = { + "managed_outbound_ip_profile": { + "key": "managedOutboundIPProfile", + "type": "ManagedClusterManagedOutboundIPProfile", + }, + "effective_outbound_i_ps": {"key": "effectiveOutboundIPs", "type": "[ResourceReference]"}, + "idle_timeout_in_minutes": {"key": "idleTimeoutInMinutes", "type": "int"}, + } + + def __init__( + self, + *, + managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, + effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None, + idle_timeout_in_minutes: int = 4, + **kwargs: Any + ) -> None: + """ + :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the + cluster NAT gateway. + :paramtype managed_outbound_ip_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterManagedOutboundIPProfile + :keyword effective_outbound_i_ps: The effective outbound IP resources of the cluster NAT + gateway. + :paramtype effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ResourceReference] + :keyword idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 4 minutes. + :paramtype idle_timeout_in_minutes: int + """ + super().__init__(**kwargs) + self.managed_outbound_ip_profile = managed_outbound_ip_profile + self.effective_outbound_i_ps = effective_outbound_i_ps + self.idle_timeout_in_minutes = idle_timeout_in_minutes + + +class ManagedClusterNodeResourceGroupProfile(_serialization.Model): + """Node resource group lockdown profile for a managed cluster. + + :ivar restriction_level: The restriction level applied to the cluster's node resource group. + Known values are: "Unrestricted" and "ReadOnly". + :vartype restriction_level: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RestrictionLevel + """ + + _attribute_map = { + "restriction_level": {"key": "restrictionLevel", "type": "str"}, + } + + def __init__( + self, *, restriction_level: Optional[Union[str, "_models.RestrictionLevel"]] = None, **kwargs: Any + ) -> None: + """ + :keyword restriction_level: The restriction level applied to the cluster's node resource group. + Known values are: "Unrestricted" and "ReadOnly". + :paramtype restriction_level: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RestrictionLevel + """ + super().__init__(**kwargs) + self.restriction_level = restriction_level + + +class ManagedClusterOIDCIssuerProfile(_serialization.Model): + """The OIDC issuer profile of the Managed Cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar issuer_url: The OIDC issuer url of the Managed Cluster. + :vartype issuer_url: str + :ivar enabled: Whether the OIDC issuer is enabled. + :vartype enabled: bool + """ + + _validation = { + "issuer_url": {"readonly": True}, + } + + _attribute_map = { + "issuer_url": {"key": "issuerURL", "type": "str"}, + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether the OIDC issuer is enabled. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.issuer_url = None + self.enabled = enabled + + +class ManagedClusterPodIdentity(_serialization.Model): + """Details about the pod identity assigned to the Managed Cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The name of the pod identity. Required. + :vartype name: str + :ivar namespace: The namespace of the pod identity. Required. + :vartype namespace: str + :ivar binding_selector: The binding selector to use for the AzureIdentityBinding resource. + :vartype binding_selector: str + :ivar identity: The user assigned identity details. Required. + :vartype identity: ~azure.mgmt.containerservice.v2023_01_02_preview.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Known values are: + "Assigned", "Canceled", "Deleting", "Failed", "Succeeded", and "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningState + :ivar provisioning_info: + :vartype provisioning_info: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningInfo + """ + + _validation = { + "name": {"required": True}, + "namespace": {"required": True}, + "identity": {"required": True}, + "provisioning_state": {"readonly": True}, + "provisioning_info": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "binding_selector": {"key": "bindingSelector", "type": "str"}, + "identity": {"key": "identity", "type": "UserAssignedIdentity"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "provisioning_info": {"key": "provisioningInfo", "type": "ManagedClusterPodIdentityProvisioningInfo"}, + } + + def __init__( + self, + *, + name: str, + namespace: str, + identity: "_models.UserAssignedIdentity", + binding_selector: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the pod identity. Required. + :paramtype name: str + :keyword namespace: The namespace of the pod identity. Required. + :paramtype namespace: str + :keyword binding_selector: The binding selector to use for the AzureIdentityBinding resource. + :paramtype binding_selector: str + :keyword identity: The user assigned identity details. Required. + :paramtype identity: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.UserAssignedIdentity + """ + super().__init__(**kwargs) + self.name = name + self.namespace = namespace + self.binding_selector = binding_selector + self.identity = identity + self.provisioning_state = None + self.provisioning_info = None + + +class ManagedClusterPodIdentityException(_serialization.Model): + """See `disable AAD Pod Identity for a specific Pod/Application + `_ for more + details. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The name of the pod identity exception. Required. + :vartype name: str + :ivar namespace: The namespace of the pod identity exception. Required. + :vartype namespace: str + :ivar pod_labels: The pod labels to match. Required. + :vartype pod_labels: dict[str, str] + """ + + _validation = { + "name": {"required": True}, + "namespace": {"required": True}, + "pod_labels": {"required": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "pod_labels": {"key": "podLabels", "type": "{str}"}, + } + + def __init__(self, *, name: str, namespace: str, pod_labels: Dict[str, str], **kwargs: Any) -> None: + """ + :keyword name: The name of the pod identity exception. Required. + :paramtype name: str + :keyword namespace: The namespace of the pod identity exception. Required. + :paramtype namespace: str + :keyword pod_labels: The pod labels to match. Required. + :paramtype pod_labels: dict[str, str] + """ + super().__init__(**kwargs) + self.name = name + self.namespace = namespace + self.pod_labels = pod_labels + + +class ManagedClusterPodIdentityProfile(_serialization.Model): + """See `use AAD pod identity `_ + for more details on pod identity integration. + + :ivar enabled: Whether the pod identity addon is enabled. + :vartype enabled: bool + :ivar allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the + security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet + network plugin with AAD Pod Identity + `_ + for more information. + :vartype allow_network_plugin_kubenet: bool + :ivar user_assigned_identities: The pod identities to use in the cluster. + :vartype user_assigned_identities: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentity] + :ivar user_assigned_identity_exceptions: The pod identity exceptions to allow. + :vartype user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityException] + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "allow_network_plugin_kubenet": {"key": "allowNetworkPluginKubenet", "type": "bool"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "[ManagedClusterPodIdentity]"}, + "user_assigned_identity_exceptions": { + "key": "userAssignedIdentityExceptions", + "type": "[ManagedClusterPodIdentityException]", + }, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + allow_network_plugin_kubenet: Optional[bool] = None, + user_assigned_identities: Optional[List["_models.ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["_models.ManagedClusterPodIdentityException"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Whether the pod identity addon is enabled. + :paramtype enabled: bool + :keyword allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the + security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet + network plugin with AAD Pod Identity + `_ + for more information. + :paramtype allow_network_plugin_kubenet: bool + :keyword user_assigned_identities: The pod identities to use in the cluster. + :paramtype user_assigned_identities: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentity] + :keyword user_assigned_identity_exceptions: The pod identity exceptions to allow. + :paramtype user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityException] + """ + super().__init__(**kwargs) + self.enabled = enabled + self.allow_network_plugin_kubenet = allow_network_plugin_kubenet + self.user_assigned_identities = user_assigned_identities + self.user_assigned_identity_exceptions = user_assigned_identity_exceptions + + +class ManagedClusterPodIdentityProvisioningError(_serialization.Model): + """An error response from the pod identity provisioning. + + :ivar error: Details about the error. + :vartype error: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody + """ + + _attribute_map = { + "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningErrorBody"}, + } + + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningErrorBody"] = None, **kwargs: Any + ) -> None: + """ + :keyword error: Details about the error. + :paramtype error: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody + """ + super().__init__(**kwargs) + self.error = error + + +class ManagedClusterPodIdentityProvisioningErrorBody(_serialization.Model): + """An error response from the pod identity provisioning. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of the property in + error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody] + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ManagedClusterPodIdentityProvisioningErrorBody]"}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["_models.ManagedClusterPodIdentityProvisioningErrorBody"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :paramtype code: str + :keyword message: A message describing the error, intended to be suitable for display in a user + interface. + :paramtype message: str + :keyword target: The target of the particular error. For example, the name of the property in + error. + :paramtype target: str + :keyword details: A list of additional details about the error. + :paramtype details: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody] + """ + super().__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): + """ManagedClusterPodIdentityProvisioningInfo. + + :ivar error: Pod identity assignment error (if any). + :vartype error: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningError + """ + + _attribute_map = { + "error": {"key": "error", "type": "ManagedClusterPodIdentityProvisioningError"}, + } + + def __init__( + self, *, error: Optional["_models.ManagedClusterPodIdentityProvisioningError"] = None, **kwargs: Any + ) -> None: + """ + :keyword error: Pod identity assignment error (if any). + :paramtype error: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPodIdentityProvisioningError + """ + super().__init__(**kwargs) + self.error = error + + +class ManagedClusterPoolUpgradeProfile(_serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :vartype kubernetes_version: str + :ivar name: The Agent Pool name. + :vartype name: str + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :ivar upgrades: List of orchestrator types and versions available for upgrade. + :vartype upgrades: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + "kubernetes_version": {"required": True}, + "os_type": {"required": True}, + } + + _attribute_map = { + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "os_type": {"key": "osType", "type": "str"}, + "upgrades": {"key": "upgrades", "type": "[ManagedClusterPoolUpgradeProfileUpgradesItem]"}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "_models.OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). Required. + :paramtype kubernetes_version: str + :keyword name: The Agent Pool name. + :paramtype name: str + :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" + and "Windows". + :paramtype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :keyword upgrades: List of orchestrator types and versions available for upgrade. + :paramtype upgrades: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + super().__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.name = name + self.os_type = os_type + self.upgrades = upgrades + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :ivar kubernetes_version: The Kubernetes version (major.minor.patch). + :vartype kubernetes_version: str + :ivar is_preview: Whether the Kubernetes version is currently in preview. + :vartype is_preview: bool + """ + + _attribute_map = { + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "is_preview": {"key": "isPreview", "type": "bool"}, + } + + def __init__( + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The Kubernetes version (major.minor.patch). + :paramtype kubernetes_version: str + :keyword is_preview: Whether the Kubernetes version is currently in preview. + :paramtype is_preview: bool + """ + super().__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class ManagedClusterPropertiesAutoScalerProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Parameters to be applied to the cluster-autoscaler when enabled. + + :ivar balance_similar_node_groups: Valid values are 'true' and 'false'. + :vartype balance_similar_node_groups: str + :ivar expander: If not specified, the default is 'random'. See `expanders + `_ + for more information. Known values are: "least-waste", "most-pods", "priority", and "random". + :vartype expander: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Expander + :ivar max_empty_bulk_delete: The default is 10. + :vartype max_empty_bulk_delete: str + :ivar max_graceful_termination_sec: The default is 600. + :vartype max_graceful_termination_sec: str + :ivar max_node_provision_time: The default is '15m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :vartype max_node_provision_time: str + :ivar max_total_unready_percentage: The default is 45. The maximum is 100 and the minimum is 0. + :vartype max_total_unready_percentage: str + :ivar new_pod_scale_up_delay: For scenarios like burst/batch scale where you don't want CA to + act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore + unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer + followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + :vartype new_pod_scale_up_delay: str + :ivar ok_total_unready_count: This must be an integer. The default is 3. + :vartype ok_total_unready_count: str + :ivar scan_interval: The default is '10'. Values must be an integer number of seconds. + :vartype scan_interval: str + :ivar scale_down_delay_after_add: The default is '10m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_delay_after_add: str + :ivar scale_down_delay_after_delete: The default is the scan-interval. Values must be an + integer followed by an 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_delay_after_delete: str + :ivar scale_down_delay_after_failure: The default is '3m'. Values must be an integer followed + by an 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_delay_after_failure: str + :ivar scale_down_unneeded_time: The default is '10m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_unneeded_time: str + :ivar scale_down_unready_time: The default is '20m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :vartype scale_down_unready_time: str + :ivar scale_down_utilization_threshold: The default is '0.5'. + :vartype scale_down_utilization_threshold: str + :ivar skip_nodes_with_local_storage: The default is true. + :vartype skip_nodes_with_local_storage: str + :ivar skip_nodes_with_system_pods: The default is true. + :vartype skip_nodes_with_system_pods: str + """ + + _attribute_map = { + "balance_similar_node_groups": {"key": "balance-similar-node-groups", "type": "str"}, + "expander": {"key": "expander", "type": "str"}, + "max_empty_bulk_delete": {"key": "max-empty-bulk-delete", "type": "str"}, + "max_graceful_termination_sec": {"key": "max-graceful-termination-sec", "type": "str"}, + "max_node_provision_time": {"key": "max-node-provision-time", "type": "str"}, + "max_total_unready_percentage": {"key": "max-total-unready-percentage", "type": "str"}, + "new_pod_scale_up_delay": {"key": "new-pod-scale-up-delay", "type": "str"}, + "ok_total_unready_count": {"key": "ok-total-unready-count", "type": "str"}, + "scan_interval": {"key": "scan-interval", "type": "str"}, + "scale_down_delay_after_add": {"key": "scale-down-delay-after-add", "type": "str"}, + "scale_down_delay_after_delete": {"key": "scale-down-delay-after-delete", "type": "str"}, + "scale_down_delay_after_failure": {"key": "scale-down-delay-after-failure", "type": "str"}, + "scale_down_unneeded_time": {"key": "scale-down-unneeded-time", "type": "str"}, + "scale_down_unready_time": {"key": "scale-down-unready-time", "type": "str"}, + "scale_down_utilization_threshold": {"key": "scale-down-utilization-threshold", "type": "str"}, + "skip_nodes_with_local_storage": {"key": "skip-nodes-with-local-storage", "type": "str"}, + "skip_nodes_with_system_pods": {"key": "skip-nodes-with-system-pods", "type": "str"}, + } + + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "_models.Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provision_time: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword balance_similar_node_groups: Valid values are 'true' and 'false'. + :paramtype balance_similar_node_groups: str + :keyword expander: If not specified, the default is 'random'. See `expanders + `_ + for more information. Known values are: "least-waste", "most-pods", "priority", and "random". + :paramtype expander: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Expander + :keyword max_empty_bulk_delete: The default is 10. + :paramtype max_empty_bulk_delete: str + :keyword max_graceful_termination_sec: The default is 600. + :paramtype max_graceful_termination_sec: str + :keyword max_node_provision_time: The default is '15m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :paramtype max_node_provision_time: str + :keyword max_total_unready_percentage: The default is 45. The maximum is 100 and the minimum is + 0. + :paramtype max_total_unready_percentage: str + :keyword new_pod_scale_up_delay: For scenarios like burst/batch scale where you don't want CA + to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore + unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer + followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + :paramtype new_pod_scale_up_delay: str + :keyword ok_total_unready_count: This must be an integer. The default is 3. + :paramtype ok_total_unready_count: str + :keyword scan_interval: The default is '10'. Values must be an integer number of seconds. + :paramtype scan_interval: str + :keyword scale_down_delay_after_add: The default is '10m'. Values must be an integer followed + by an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_delay_after_add: str + :keyword scale_down_delay_after_delete: The default is the scan-interval. Values must be an + integer followed by an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_delay_after_delete: str + :keyword scale_down_delay_after_failure: The default is '3m'. Values must be an integer + followed by an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_delay_after_failure: str + :keyword scale_down_unneeded_time: The default is '10m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_unneeded_time: str + :keyword scale_down_unready_time: The default is '20m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :paramtype scale_down_unready_time: str + :keyword scale_down_utilization_threshold: The default is '0.5'. + :paramtype scale_down_utilization_threshold: str + :keyword skip_nodes_with_local_storage: The default is true. + :paramtype skip_nodes_with_local_storage: str + :keyword skip_nodes_with_system_pods: The default is true. + :paramtype skip_nodes_with_system_pods: str + """ + super().__init__(**kwargs) + self.balance_similar_node_groups = balance_similar_node_groups + self.expander = expander + self.max_empty_bulk_delete = max_empty_bulk_delete + self.max_graceful_termination_sec = max_graceful_termination_sec + self.max_node_provision_time = max_node_provision_time + self.max_total_unready_percentage = max_total_unready_percentage + self.new_pod_scale_up_delay = new_pod_scale_up_delay + self.ok_total_unready_count = ok_total_unready_count + self.scan_interval = scan_interval + self.scale_down_delay_after_add = scale_down_delay_after_add + self.scale_down_delay_after_delete = scale_down_delay_after_delete + self.scale_down_delay_after_failure = scale_down_delay_after_failure + self.scale_down_unneeded_time = scale_down_unneeded_time + self.scale_down_unready_time = scale_down_unready_time + self.scale_down_utilization_threshold = scale_down_utilization_threshold + self.skip_nodes_with_local_storage = skip_nodes_with_local_storage + self.skip_nodes_with_system_pods = skip_nodes_with_system_pods + + +class ManagedClusterPropertiesForSnapshot(_serialization.Model): + """managed cluster properties for snapshot, these properties are read only. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubernetes_version: The current kubernetes version. + :vartype kubernetes_version: str + :ivar sku: The current managed cluster sku. + :vartype sku: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKU + :ivar enable_rbac: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + :vartype enable_rbac: bool + :ivar network_profile: The current network profile. + :vartype network_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkProfileForSnapshot + """ + + _validation = { + "network_profile": {"readonly": True}, + } + + _attribute_map = { + "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, + "sku": {"key": "sku", "type": "ManagedClusterSKU"}, + "enable_rbac": {"key": "enableRbac", "type": "bool"}, + "network_profile": {"key": "networkProfile", "type": "NetworkProfileForSnapshot"}, + } + + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + sku: Optional["_models.ManagedClusterSKU"] = None, + enable_rbac: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword kubernetes_version: The current kubernetes version. + :paramtype kubernetes_version: str + :keyword sku: The current managed cluster sku. + :paramtype sku: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKU + :keyword enable_rbac: Whether the cluster has enabled Kubernetes Role-Based Access Control or + not. + :paramtype enable_rbac: bool + """ + super().__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.sku = sku + self.enable_rbac = enable_rbac + self.network_profile = None + + +class ManagedClusterSecurityProfile(_serialization.Model): + """Security profile for the container service cluster. + + :ivar defender: Microsoft Defender settings for the security profile. + :vartype defender: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileDefender + :ivar azure_key_vault_kms: Azure Key Vault `key management service + `_ settings for the security + profile. + :vartype azure_key_vault_kms: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AzureKeyVaultKms + :ivar workload_identity: `Workload Identity + `_ settings for the security profile. + :vartype workload_identity: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileWorkloadIdentity + :ivar image_cleaner: ImageCleaner settings for the security profile. + :vartype image_cleaner: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileImageCleaner + :ivar node_restriction: `Node Restriction + `_ + settings for the security profile. + :vartype node_restriction: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileNodeRestriction + :ivar custom_ca_trust_certificates: A list of up to 10 base64 encoded CAs that will be added to + the trust store on nodes with the Custom CA Trust feature enabled. For more information see + `Custom CA Trust Certificates + `_. + :vartype custom_ca_trust_certificates: list[bytes] + """ + + _validation = { + "custom_ca_trust_certificates": {"max_items": 10, "min_items": 0}, + } + + _attribute_map = { + "defender": {"key": "defender", "type": "ManagedClusterSecurityProfileDefender"}, + "azure_key_vault_kms": {"key": "azureKeyVaultKms", "type": "AzureKeyVaultKms"}, + "workload_identity": {"key": "workloadIdentity", "type": "ManagedClusterSecurityProfileWorkloadIdentity"}, + "image_cleaner": {"key": "imageCleaner", "type": "ManagedClusterSecurityProfileImageCleaner"}, + "node_restriction": {"key": "nodeRestriction", "type": "ManagedClusterSecurityProfileNodeRestriction"}, + "custom_ca_trust_certificates": {"key": "customCATrustCertificates", "type": "[bytearray]"}, + } + + def __init__( + self, + *, + defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, + azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, + workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, + image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, + node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, + custom_ca_trust_certificates: Optional[List[bytes]] = None, + **kwargs: Any + ) -> None: + """ + :keyword defender: Microsoft Defender settings for the security profile. + :paramtype defender: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileDefender + :keyword azure_key_vault_kms: Azure Key Vault `key management service + `_ settings for the security + profile. + :paramtype azure_key_vault_kms: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AzureKeyVaultKms + :keyword workload_identity: `Workload Identity + `_ settings for the security profile. + :paramtype workload_identity: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileWorkloadIdentity + :keyword image_cleaner: ImageCleaner settings for the security profile. + :paramtype image_cleaner: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileImageCleaner + :keyword node_restriction: `Node Restriction + `_ + settings for the security profile. + :paramtype node_restriction: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileNodeRestriction + :keyword custom_ca_trust_certificates: A list of up to 10 base64 encoded CAs that will be added + to the trust store on nodes with the Custom CA Trust feature enabled. For more information see + `Custom CA Trust Certificates + `_. + :paramtype custom_ca_trust_certificates: list[bytes] + """ + super().__init__(**kwargs) + self.defender = defender + self.azure_key_vault_kms = azure_key_vault_kms + self.workload_identity = workload_identity + self.image_cleaner = image_cleaner + self.node_restriction = node_restriction + self.custom_ca_trust_certificates = custom_ca_trust_certificates + + +class ManagedClusterSecurityProfileDefender(_serialization.Model): + """Microsoft Defender settings for the security profile. + + :ivar log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be + associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required + and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field + empty. + :vartype log_analytics_workspace_resource_id: str + :ivar security_monitoring: Microsoft Defender threat detection for Cloud settings for the + security profile. + :vartype security_monitoring: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring + """ + + _attribute_map = { + "log_analytics_workspace_resource_id": {"key": "logAnalyticsWorkspaceResourceId", "type": "str"}, + "security_monitoring": { + "key": "securityMonitoring", + "type": "ManagedClusterSecurityProfileDefenderSecurityMonitoring", + }, + } + + def __init__( + self, + *, + log_analytics_workspace_resource_id: Optional[str] = None, + security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, + **kwargs: Any + ) -> None: + """ + :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be + associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required + and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field + empty. + :paramtype log_analytics_workspace_resource_id: str + :keyword security_monitoring: Microsoft Defender threat detection for Cloud settings for the + security profile. + :paramtype security_monitoring: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring + """ + super().__init__(**kwargs) + self.log_analytics_workspace_resource_id = log_analytics_workspace_resource_id + self.security_monitoring = security_monitoring + + +class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Model): + """Microsoft Defender settings for the security profile threat detection. + + :ivar enabled: Whether to enable Defender threat detection. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable Defender threat detection. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterSecurityProfileImageCleaner(_serialization.Model): + """ImageCleaner removes unused images from nodes, freeing up disk space and helping to reduce + attack surface area. Here are settings for the security profile. + + :ivar enabled: Whether to enable ImageCleaner on AKS cluster. + :vartype enabled: bool + :ivar interval_hours: ImageCleaner scanning interval. + :vartype interval_hours: int + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "interval_hours": {"key": "intervalHours", "type": "int"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[int] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable ImageCleaner on AKS cluster. + :paramtype enabled: bool + :keyword interval_hours: ImageCleaner scanning interval. + :paramtype interval_hours: int + """ + super().__init__(**kwargs) + self.enabled = enabled + self.interval_hours = interval_hours + + +class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): + """Node Restriction settings for the security profile. + + :ivar enabled: Whether to enable Node Restriction. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable Node Restriction. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): + """Workload Identity settings for the security profile. + + :ivar enabled: Whether to enable Workload Identity. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable Workload Identity. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterServicePrincipalProfile(_serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure + APIs. + + All required parameters must be populated in order to send to Azure. + + :ivar client_id: The ID for the service principal. Required. + :vartype client_id: str + :ivar secret: The secret password associated with the service principal in plain text. + :vartype secret: str + """ + + _validation = { + "client_id": {"required": True}, + } + + _attribute_map = { + "client_id": {"key": "clientId", "type": "str"}, + "secret": {"key": "secret", "type": "str"}, + } + + def __init__(self, *, client_id: str, secret: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword client_id: The ID for the service principal. Required. + :paramtype client_id: str + :keyword secret: The secret password associated with the service principal in plain text. + :paramtype secret: str + """ + super().__init__(**kwargs) + self.client_id = client_id + self.secret = secret + + +class ManagedClusterSKU(_serialization.Model): + """The SKU of a Managed Cluster. + + :ivar name: The name of a managed cluster SKU. Known values are: "Basic" and "Base". + :vartype name: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKUName + :ivar tier: If not specified, the default is 'Free'. See `AKS Pricing Tier + `_ for more details. Known + values are: "Paid", "Standard", and "Free". + :vartype tier: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKUTier + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of a managed cluster SKU. Known values are: "Basic" and "Base". + :paramtype name: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKUName + :keyword tier: If not specified, the default is 'Free'. See `AKS Pricing Tier + `_ for more details. Known + values are: "Paid", "Standard", and "Free". + :paramtype tier: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSKUTier + """ + super().__init__(**kwargs) + self.name = name + self.tier = tier + + +class ManagedClusterSnapshot(TrackedResource): + """A managed cluster snapshot resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar creation_data: CreationData to be used to specify the source resource ID to create this + snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :ivar snapshot_type: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". + :vartype snapshot_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.SnapshotType + :ivar managed_cluster_properties_read_only: What the properties will be showed when getting + managed cluster snapshot. Those properties are read-only. + :vartype managed_cluster_properties_read_only: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPropertiesForSnapshot + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "managed_cluster_properties_read_only": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "creation_data": {"key": "properties.creationData", "type": "CreationData"}, + "snapshot_type": {"key": "properties.snapshotType", "type": "str"}, + "managed_cluster_properties_read_only": { + "key": "properties.managedClusterPropertiesReadOnly", + "type": "ManagedClusterPropertiesForSnapshot", + }, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + creation_data: Optional["_models.CreationData"] = None, + snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword creation_data: CreationData to be used to specify the source resource ID to create + this snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :keyword snapshot_type: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". + :paramtype snapshot_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.SnapshotType + """ + super().__init__(tags=tags, location=location, **kwargs) + self.creation_data = creation_data + self.snapshot_type = snapshot_type + self.managed_cluster_properties_read_only = None + + +class ManagedClusterSnapshotListResult(_serialization.Model): + """The response from the List Managed Cluster Snapshots operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of managed cluster snapshots. + :vartype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot] + :ivar next_link: The URL to get the next set of managed cluster snapshot results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[ManagedClusterSnapshot]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of managed cluster snapshots. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class ManagedClusterStorageProfile(_serialization.Model): + """Storage profile for the container service cluster. + + :ivar disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. + :vartype disk_csi_driver: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileDiskCSIDriver + :ivar file_csi_driver: AzureFile CSI Driver settings for the storage profile. + :vartype file_csi_driver: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileFileCSIDriver + :ivar snapshot_controller: Snapshot Controller settings for the storage profile. + :vartype snapshot_controller: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileSnapshotController + :ivar blob_csi_driver: AzureBlob CSI Driver settings for the storage profile. + :vartype blob_csi_driver: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileBlobCSIDriver + """ + + _attribute_map = { + "disk_csi_driver": {"key": "diskCSIDriver", "type": "ManagedClusterStorageProfileDiskCSIDriver"}, + "file_csi_driver": {"key": "fileCSIDriver", "type": "ManagedClusterStorageProfileFileCSIDriver"}, + "snapshot_controller": {"key": "snapshotController", "type": "ManagedClusterStorageProfileSnapshotController"}, + "blob_csi_driver": {"key": "blobCSIDriver", "type": "ManagedClusterStorageProfileBlobCSIDriver"}, + } + + def __init__( + self, + *, + disk_csi_driver: Optional["_models.ManagedClusterStorageProfileDiskCSIDriver"] = None, + file_csi_driver: Optional["_models.ManagedClusterStorageProfileFileCSIDriver"] = None, + snapshot_controller: Optional["_models.ManagedClusterStorageProfileSnapshotController"] = None, + blob_csi_driver: Optional["_models.ManagedClusterStorageProfileBlobCSIDriver"] = None, + **kwargs: Any + ) -> None: + """ + :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. + :paramtype disk_csi_driver: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileDiskCSIDriver + :keyword file_csi_driver: AzureFile CSI Driver settings for the storage profile. + :paramtype file_csi_driver: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileFileCSIDriver + :keyword snapshot_controller: Snapshot Controller settings for the storage profile. + :paramtype snapshot_controller: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileSnapshotController + :keyword blob_csi_driver: AzureBlob CSI Driver settings for the storage profile. + :paramtype blob_csi_driver: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterStorageProfileBlobCSIDriver + """ + super().__init__(**kwargs) + self.disk_csi_driver = disk_csi_driver + self.file_csi_driver = file_csi_driver + self.snapshot_controller = snapshot_controller + self.blob_csi_driver = blob_csi_driver + + +class ManagedClusterStorageProfileBlobCSIDriver(_serialization.Model): + """AzureBlob CSI Driver settings for the storage profile. + + :ivar enabled: Whether to enable AzureBlob CSI Driver. The default value is false. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable AzureBlob CSI Driver. The default value is false. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): + """AzureDisk CSI Driver settings for the storage profile. + + :ivar enabled: Whether to enable AzureDisk CSI Driver. The default value is true. + :vartype enabled: bool + :ivar version: The version of AzureDisk CSI Driver. The default value is v1. + :vartype version: str + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "version": {"key": "version", "type": "str"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. + :paramtype enabled: bool + :keyword version: The version of AzureDisk CSI Driver. The default value is v1. + :paramtype version: str + """ + super().__init__(**kwargs) + self.enabled = enabled + self.version = version + + +class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): + """AzureFile CSI Driver settings for the storage profile. + + :ivar enabled: Whether to enable AzureFile CSI Driver. The default value is true. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable AzureFile CSI Driver. The default value is true. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterStorageProfileSnapshotController(_serialization.Model): + """Snapshot Controller settings for the storage profile. + + :ivar enabled: Whether to enable Snapshot Controller. The default value is true. + :vartype enabled: bool + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable Snapshot Controller. The default value is true. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterUpgradeProfile(_serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the upgrade profile. + :vartype id: str + :ivar name: The name of the upgrade profile. + :vartype name: str + :ivar type: The type of the upgrade profile. + :vartype type: str + :ivar control_plane_profile: The list of available upgrade versions for the control plane. + Required. + :vartype control_plane_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPoolUpgradeProfile + :ivar agent_pool_profiles: The list of available upgrade versions for agent pools. Required. + :vartype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "control_plane_profile": {"required": True}, + "agent_pool_profiles": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "control_plane_profile": {"key": "properties.controlPlaneProfile", "type": "ManagedClusterPoolUpgradeProfile"}, + "agent_pool_profiles": {"key": "properties.agentPoolProfiles", "type": "[ManagedClusterPoolUpgradeProfile]"}, + } + + def __init__( + self, + *, + control_plane_profile: "_models.ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["_models.ManagedClusterPoolUpgradeProfile"], + **kwargs: Any + ) -> None: + """ + :keyword control_plane_profile: The list of available upgrade versions for the control plane. + Required. + :paramtype control_plane_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPoolUpgradeProfile + :keyword agent_pool_profiles: The list of available upgrade versions for agent pools. Required. + :paramtype agent_pool_profiles: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterPoolUpgradeProfile] + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = control_plane_profile + self.agent_pool_profiles = agent_pool_profiles + + +class ManagedClusterWindowsProfile(_serialization.Model): + """Profile for Windows VMs in the managed cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` + **Restriction:** Cannot end in "." :code:`
`:code:`
` **Disallowed values:** + "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", + "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", + "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", + "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 character + :code:`
`:code:`
` **Max-length:** 20 characters. Required. + :vartype admin_username: str + :ivar admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :vartype admin_password: str + :ivar license_type: The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. Known values are: + "None" and "Windows_Server". + :vartype license_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LicenseType + :ivar enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo + `_. + :vartype enable_csi_proxy: bool + :ivar gmsa_profile: The Windows gMSA Profile in the Managed Cluster. + :vartype gmsa_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WindowsGmsaProfile + """ + + _validation = { + "admin_username": {"required": True}, + } + + _attribute_map = { + "admin_username": {"key": "adminUsername", "type": "str"}, + "admin_password": {"key": "adminPassword", "type": "str"}, + "license_type": {"key": "licenseType", "type": "str"}, + "enable_csi_proxy": {"key": "enableCSIProxy", "type": "bool"}, + "gmsa_profile": {"key": "gmsaProfile", "type": "WindowsGmsaProfile"}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "_models.LicenseType"]] = None, + enable_csi_proxy: Optional[bool] = None, + gmsa_profile: Optional["_models.WindowsGmsaProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword admin_username: Specifies the name of the administrator account. + :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. Required. + :paramtype admin_username: str + :keyword admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :paramtype admin_password: str + :keyword license_type: The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. Known values are: + "None" and "Windows_Server". + :paramtype license_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LicenseType + :keyword enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo + `_. + :paramtype enable_csi_proxy: bool + :keyword gmsa_profile: The Windows gMSA Profile in the Managed Cluster. + :paramtype gmsa_profile: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.WindowsGmsaProfile + """ + super().__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + self.license_type = license_type + self.enable_csi_proxy = enable_csi_proxy + self.gmsa_profile = gmsa_profile + + +class ManagedClusterWorkloadAutoScalerProfile(_serialization.Model): + """Workload Auto-scaler profile for the managed cluster. + + :ivar keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler + profile. + :vartype keda: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileKeda + :ivar vertical_pod_autoscaler: + :vartype vertical_pod_autoscaler: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + """ + + _attribute_map = { + "keda": {"key": "keda", "type": "ManagedClusterWorkloadAutoScalerProfileKeda"}, + "vertical_pod_autoscaler": { + "key": "verticalPodAutoscaler", + "type": "ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler", + }, + } + + def __init__( + self, + *, + keda: Optional["_models.ManagedClusterWorkloadAutoScalerProfileKeda"] = None, + vertical_pod_autoscaler: Optional[ + "_models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler" + ] = None, + **kwargs: Any + ) -> None: + """ + :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler + profile. + :paramtype keda: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileKeda + :keyword vertical_pod_autoscaler: + :paramtype vertical_pod_autoscaler: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + """ + super().__init__(**kwargs) + self.keda = keda + self.vertical_pod_autoscaler = vertical_pod_autoscaler + + +class ManagedClusterWorkloadAutoScalerProfileKeda(_serialization.Model): + """KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether to enable KEDA. Required. + :vartype enabled: bool + """ + + _validation = { + "enabled": {"required": True}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + } + + def __init__(self, *, enabled: bool, **kwargs: Any) -> None: + """ + :keyword enabled: Whether to enable KEDA. Required. + :paramtype enabled: bool + """ + super().__init__(**kwargs) + self.enabled = enabled + + +class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(_serialization.Model): + """ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Whether to enable VPA. Default value is false. Required. + :vartype enabled: bool + :ivar controlled_values: Controls which resource value autoscaler will change. Default value is + RequestsAndLimits. Known values are: "RequestsAndLimits" and "RequestsOnly". + :vartype controlled_values: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ControlledValues + :ivar update_mode: Each update mode level is a superset of the lower levels. + Off None: + """ + :keyword enabled: Whether to enable VPA. Default value is false. Required. + :paramtype enabled: bool + :keyword controlled_values: Controls which resource value autoscaler will change. Default value + is RequestsAndLimits. Known values are: "RequestsAndLimits" and "RequestsOnly". + :paramtype controlled_values: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ControlledValues + :keyword update_mode: Each update mode level is a superset of the lower levels. + Off None: + """ """ + super().__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class NetworkProfileForSnapshot(_serialization.Model): + """network profile for managed cluster snapshot, these properties are read only. + + :ivar network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", + "kubenet", and "none". + :vartype network_plugin: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPlugin + :ivar network_plugin_mode: NetworkPluginMode for managed cluster snapshot. "Overlay" + :vartype network_plugin_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPluginMode + :ivar network_policy: networkPolicy for managed cluster snapshot. Known values are: "calico" + and "azure". + :vartype network_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPolicy + :ivar network_mode: networkMode for managed cluster snapshot. Known values are: "transparent" + and "bridge". + :vartype network_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkMode + :ivar load_balancer_sku: loadBalancerSku for managed cluster snapshot. Known values are: + "standard" and "basic". + :vartype load_balancer_sku: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LoadBalancerSku + """ + + _attribute_map = { + "network_plugin": {"key": "networkPlugin", "type": "str"}, + "network_plugin_mode": {"key": "networkPluginMode", "type": "str"}, + "network_policy": {"key": "networkPolicy", "type": "str"}, + "network_mode": {"key": "networkMode", "type": "str"}, + "load_balancer_sku": {"key": "loadBalancerSku", "type": "str"}, + } + + def __init__( + self, + *, + network_plugin: Union[str, "_models.NetworkPlugin"] = "kubenet", + network_plugin_mode: Optional[Union[str, "_models.NetworkPluginMode"]] = None, + network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, + load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", + "kubenet", and "none". + :paramtype network_plugin: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPlugin + :keyword network_plugin_mode: NetworkPluginMode for managed cluster snapshot. "Overlay" + :paramtype network_plugin_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPluginMode + :keyword network_policy: networkPolicy for managed cluster snapshot. Known values are: "calico" + and "azure". + :paramtype network_policy: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkPolicy + :keyword network_mode: networkMode for managed cluster snapshot. Known values are: + "transparent" and "bridge". + :paramtype network_mode: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.NetworkMode + :keyword load_balancer_sku: loadBalancerSku for managed cluster snapshot. Known values are: + "standard" and "basic". + :paramtype load_balancer_sku: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.LoadBalancerSku + """ + super().__init__(**kwargs) + self.network_plugin = network_plugin + self.network_plugin_mode = network_plugin_mode + self.network_policy = network_policy + self.network_mode = network_mode + self.load_balancer_sku = load_balancer_sku + + +class OperationListResult(_serialization.Model): + """The List Operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of operations. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.OperationValue] + """ + + _validation = { + "value": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[OperationValue]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.value = None + + +class OperationValue(_serialization.Model): + """Describes the properties of a Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the operation. + :vartype origin: str + :ivar name: The name of the operation. + :vartype name: str + :ivar operation: The display name of the operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + "origin": {"readonly": True}, + "name": {"readonly": True}, + "operation": {"readonly": True}, + "resource": {"readonly": True}, + "description": {"readonly": True}, + "provider": {"readonly": True}, + } + + _attribute_map = { + "origin": {"key": "origin", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "operation": {"key": "display.operation", "type": "str"}, + "resource": {"key": "display.resource", "type": "str"}, + "description": {"key": "display.description", "type": "str"}, + "provider": {"key": "display.provider", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class OSOptionProfile(_serialization.Model): + """The OS option profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the OS option resource. + :vartype id: str + :ivar name: The name of the OS option resource. + :vartype name: str + :ivar type: The type of the OS option resource. + :vartype type: str + :ivar os_option_property_list: The list of OS options. Required. + :vartype os_option_property_list: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.OSOptionProperty] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "os_option_property_list": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "os_option_property_list": {"key": "properties.osOptionPropertyList", "type": "[OSOptionProperty]"}, + } + + def __init__(self, *, os_option_property_list: List["_models.OSOptionProperty"], **kwargs: Any) -> None: + """ + :keyword os_option_property_list: The list of OS options. Required. + :paramtype os_option_property_list: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.OSOptionProperty] + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.os_option_property_list = os_option_property_list + + +class OSOptionProperty(_serialization.Model): + """OS option property. + + All required parameters must be populated in order to send to Azure. + + :ivar os_type: The OS type. Required. + :vartype os_type: str + :ivar enable_fips_image: Whether the image is FIPS-enabled. Required. + :vartype enable_fips_image: bool + """ + + _validation = { + "os_type": {"required": True}, + "enable_fips_image": {"required": True}, + } + + _attribute_map = { + "os_type": {"key": "os-type", "type": "str"}, + "enable_fips_image": {"key": "enable-fips-image", "type": "bool"}, + } + + def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs: Any) -> None: + """ + :keyword os_type: The OS type. Required. + :paramtype os_type: str + :keyword enable_fips_image: Whether the image is FIPS-enabled. Required. + :paramtype enable_fips_image: bool + """ + super().__init__(**kwargs) + self.os_type = os_type + self.enable_fips_image = enable_fips_image + + +class OutboundEnvironmentEndpoint(_serialization.Model): + """Egress endpoints which AKS agent nodes connect to for common purpose. + + :ivar category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. + :vartype category: str + :ivar endpoints: The endpoints that AKS agent nodes connect to. + :vartype endpoints: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.EndpointDependency] + """ + + _attribute_map = { + "category": {"key": "category", "type": "str"}, + "endpoints": {"key": "endpoints", "type": "[EndpointDependency]"}, + } + + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["_models.EndpointDependency"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. + :paramtype category: str + :keyword endpoints: The endpoints that AKS agent nodes connect to. + :paramtype endpoints: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.EndpointDependency] + """ + super().__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class OutboundEnvironmentEndpointCollection(_serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Collection of resources. Required. + :vartype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + "value": {"required": True}, + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[OutboundEnvironmentEndpoint]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: + """ + :keyword value: Collection of resources. Required. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.OutboundEnvironmentEndpoint] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class PortRange(_serialization.Model): + """The port range. + + :ivar port_start: The minimum port that is included in the range. It should be ranged from 1 to + 65535, and be less than or equal to portEnd. + :vartype port_start: int + :ivar port_end: The maximum port that is included in the range. It should be ranged from 1 to + 65535, and be greater than or equal to portStart. + :vartype port_end: int + :ivar protocol: The network protocol of the port. Known values are: "TCP" and "UDP". + :vartype protocol: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Protocol + """ + + _validation = { + "port_start": {"maximum": 65535, "minimum": 1}, + "port_end": {"maximum": 65535, "minimum": 1}, + } + + _attribute_map = { + "port_start": {"key": "portStart", "type": "int"}, + "port_end": {"key": "portEnd", "type": "int"}, + "protocol": {"key": "protocol", "type": "str"}, + } + + def __init__( + self, + *, + port_start: Optional[int] = None, + port_end: Optional[int] = None, + protocol: Optional[Union[str, "_models.Protocol"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword port_start: The minimum port that is included in the range. It should be ranged from 1 + to 65535, and be less than or equal to portEnd. + :paramtype port_start: int + :keyword port_end: The maximum port that is included in the range. It should be ranged from 1 + to 65535, and be greater than or equal to portStart. + :paramtype port_end: int + :keyword protocol: The network protocol of the port. Known values are: "TCP" and "UDP". + :paramtype protocol: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Protocol + """ + super().__init__(**kwargs) + self.port_start = port_start + self.port_end = port_end + self.protocol = protocol + + +class PowerState(_serialization.Model): + """Describes the Power State of the cluster. + + :ivar code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and + "Stopped". + :vartype code: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Code + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + } + + def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwargs: Any) -> None: + """ + :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and + "Stopped". + :paramtype code: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Code + """ + super().__init__(**kwargs) + self.code = code + + +class PrivateEndpoint(_serialization.Model): + """Private endpoint which a connection belongs to. + + :ivar id: The resource ID of the private endpoint. + :vartype id: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin + """ + :keyword id: The resource ID of the private endpoint. + :paramtype id: str + """ + super().__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(_serialization.Model): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private endpoint connection. + :vartype id: str + :ivar name: The name of the private endpoint connection. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar provisioning_state: The current provisioning state. Known values are: "Canceled", + "Creating", "Deleting", "Failed", and "Succeeded". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnectionProvisioningState + :ivar private_endpoint: The resource of private endpoint. + :vartype private_endpoint: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkServiceConnectionState + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpoint"}, + "private_link_service_connection_state": { + "key": "properties.privateLinkServiceConnectionState", + "type": "PrivateLinkServiceConnectionState", + }, + } + + def __init__( + self, + *, + private_endpoint: Optional["_models.PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, + **kwargs: Any + ) -> None: + """ + :keyword private_endpoint: The resource of private endpoint. + :paramtype private_endpoint: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpoint + :keyword private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :paramtype private_link_service_connection_state: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkServiceConnectionState + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionListResult(_serialization.Model): + """A list of private endpoint connections. + + :ivar value: The collection value. + :vartype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, + } + + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The collection value. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection] + """ + super().__init__(**kwargs) + self.value = value + + +class PrivateLinkResource(_serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private link resource. + :vartype id: str + :ivar name: The name of the private link resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar group_id: The group ID of the resource. + :vartype group_id: str + :ivar required_members: The RequiredMembers of the resource. + :vartype required_members: list[str] + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. + :vartype private_link_service_id: str + """ + + _validation = { + "private_link_service_id": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "group_id": {"key": "groupId", "type": "str"}, + "required_members": {"key": "requiredMembers", "type": "[str]"}, + "private_link_service_id": {"key": "privateLinkServiceID", "type": "str"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: The ID of the private link resource. + :paramtype id: str + :keyword name: The name of the private link resource. + :paramtype name: str + :keyword type: The resource type. + :paramtype type: str + :keyword group_id: The group ID of the resource. + :paramtype group_id: str + :keyword required_members: The RequiredMembers of the resource. + :paramtype required_members: list[str] + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.group_id = group_id + self.required_members = required_members + self.private_link_service_id = None + + +class PrivateLinkResourcesListResult(_serialization.Model): + """A list of private link resources. + + :ivar value: The collection value. + :vartype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PrivateLinkResource]"}, + } + + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The collection value. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource] + """ + super().__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(_serialization.Model): + """The state of a private link service connection. + + :ivar status: The private link service connection status. Known values are: "Pending", + "Approved", "Rejected", and "Disconnected". + :vartype status: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ConnectionStatus + :ivar description: The private link service connection description. + :vartype description: str + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "_models.ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: The private link service connection status. Known values are: "Pending", + "Approved", "Rejected", and "Disconnected". + :paramtype status: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ConnectionStatus + :keyword description: The private link service connection description. + :paramtype description: str + """ + super().__init__(**kwargs) + self.status = status + self.description = description + + +class RelativeMonthlySchedule(_serialization.Model): + """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last + Friday'. + + All required parameters must be populated in order to send to Azure. + + :ivar interval_months: Specifies the number of months between each set of occurrences. + Required. + :vartype interval_months: int + :ivar week_index: Specifies on which instance of the allowed days specified in daysOfWeek the + maintenance occurs. Required. Known values are: "First", "Second", "Third", "Fourth", and + "Last". + :vartype week_index: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Type + :ivar day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known + values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". + :vartype day_of_week: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeekDay + """ + + _validation = { + "interval_months": {"required": True, "maximum": 6, "minimum": 1}, + "week_index": {"required": True}, + "day_of_week": {"required": True}, + } + + _attribute_map = { + "interval_months": {"key": "intervalMonths", "type": "int"}, + "week_index": {"key": "weekIndex", "type": "str"}, + "day_of_week": {"key": "dayOfWeek", "type": "str"}, + } + + def __init__( + self, + *, + interval_months: int, + week_index: Union[str, "_models.Type"], + day_of_week: Union[str, "_models.WeekDay"], + **kwargs: Any + ) -> None: + """ + :keyword interval_months: Specifies the number of months between each set of occurrences. + Required. + :paramtype interval_months: int + :keyword week_index: Specifies on which instance of the allowed days specified in daysOfWeek + the maintenance occurs. Required. Known values are: "First", "Second", "Third", "Fourth", and + "Last". + :paramtype week_index: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Type + :keyword day_of_week: Specifies on which day of the week the maintenance occurs. Required. + Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and + "Saturday". + :paramtype day_of_week: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeekDay + """ + super().__init__(**kwargs) + self.interval_months = interval_months + self.week_index = week_index + self.day_of_week = day_of_week + + +class ResourceReference(_serialization.Model): + """A reference to an Azure resource. + + :ivar id: The fully qualified Azure resource id. + :vartype id: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin + """ + :keyword id: The fully qualified Azure resource id. + :paramtype id: str + """ + super().__init__(**kwargs) + self.id = id + + +class RunCommandRequest(_serialization.Model): + """A run command request. + + All required parameters must be populated in order to send to Azure. + + :ivar command: The command to run. Required. + :vartype command: str + :ivar context: A base64 encoded zip file containing the files required by the command. + :vartype context: str + :ivar cluster_token: AuthToken issued for AKS AAD Server App. + :vartype cluster_token: str + """ + + _validation = { + "command": {"required": True}, + } + + _attribute_map = { + "command": {"key": "command", "type": "str"}, + "context": {"key": "context", "type": "str"}, + "cluster_token": {"key": "clusterToken", "type": "str"}, + } + + def __init__( + self, *, command: str, context: Optional[str] = None, cluster_token: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword command: The command to run. Required. + :paramtype command: str + :keyword context: A base64 encoded zip file containing the files required by the command. + :paramtype context: str + :keyword cluster_token: AuthToken issued for AKS AAD Server App. + :paramtype cluster_token: str + """ + super().__init__(**kwargs) + self.command = command + self.context = context + self.cluster_token = cluster_token + + +class RunCommandResult(_serialization.Model): + """run command result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The command id. + :vartype id: str + :ivar provisioning_state: provisioning State. + :vartype provisioning_state: str + :ivar exit_code: The exit code of the command. + :vartype exit_code: int + :ivar started_at: The time when the command started. + :vartype started_at: ~datetime.datetime + :ivar finished_at: The time when the command finished. + :vartype finished_at: ~datetime.datetime + :ivar logs: The command output. + :vartype logs: str + :ivar reason: An explanation of why provisioningState is set to failed (if so). + :vartype reason: str + """ + + _validation = { + "id": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "exit_code": {"readonly": True}, + "started_at": {"readonly": True}, + "finished_at": {"readonly": True}, + "logs": {"readonly": True}, + "reason": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "exit_code": {"key": "properties.exitCode", "type": "int"}, + "started_at": {"key": "properties.startedAt", "type": "iso-8601"}, + "finished_at": {"key": "properties.finishedAt", "type": "iso-8601"}, + "logs": {"key": "properties.logs", "type": "str"}, + "reason": {"key": "properties.reason", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.provisioning_state = None + self.exit_code = None + self.started_at = None + self.finished_at = None + self.logs = None + self.reason = None + + +class Schedule(_serialization.Model): + """One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', + 'absoluteMonthly' or 'relativeMonthly' for your maintenance schedule. + + :ivar daily: For schedules like: 'recur every day' or 'recur every 3 days'. + :vartype daily: ~azure.mgmt.containerservice.v2023_01_02_preview.models.DailySchedule + :ivar weekly: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + :vartype weekly: ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeeklySchedule + :ivar absolute_monthly: For schedules like: 'recur every month on the 15th' or 'recur every 3 + months on the 20th'. + :vartype absolute_monthly: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AbsoluteMonthlySchedule + :ivar relative_monthly: For schedules like: 'recur every month on the first Monday' or 'recur + every 3 months on last Friday'. + :vartype relative_monthly: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RelativeMonthlySchedule + """ + + _attribute_map = { + "daily": {"key": "daily", "type": "DailySchedule"}, + "weekly": {"key": "weekly", "type": "WeeklySchedule"}, + "absolute_monthly": {"key": "absoluteMonthly", "type": "AbsoluteMonthlySchedule"}, + "relative_monthly": {"key": "relativeMonthly", "type": "RelativeMonthlySchedule"}, + } + + def __init__( + self, + *, + daily: Optional["_models.DailySchedule"] = None, + weekly: Optional["_models.WeeklySchedule"] = None, + absolute_monthly: Optional["_models.AbsoluteMonthlySchedule"] = None, + relative_monthly: Optional["_models.RelativeMonthlySchedule"] = None, + **kwargs: Any + ) -> None: + """ + :keyword daily: For schedules like: 'recur every day' or 'recur every 3 days'. + :paramtype daily: ~azure.mgmt.containerservice.v2023_01_02_preview.models.DailySchedule + :keyword weekly: For schedules like: 'recur every Monday' or 'recur every 3 weeks on + Wednesday'. + :paramtype weekly: ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeeklySchedule + :keyword absolute_monthly: For schedules like: 'recur every month on the 15th' or 'recur every + 3 months on the 20th'. + :paramtype absolute_monthly: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.AbsoluteMonthlySchedule + :keyword relative_monthly: For schedules like: 'recur every month on the first Monday' or + 'recur every 3 months on last Friday'. + :paramtype relative_monthly: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RelativeMonthlySchedule + """ + super().__init__(**kwargs) + self.daily = daily + self.weekly = weekly + self.absolute_monthly = absolute_monthly + self.relative_monthly = relative_monthly + + +class Snapshot(TrackedResource): # pylint: disable=too-many-instance-attributes + """A node pool snapshot resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar creation_data: CreationData to be used to specify the source agent pool resource ID to + create this snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :ivar snapshot_type: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". + :vartype snapshot_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.SnapshotType + :ivar kubernetes_version: The version of Kubernetes. + :vartype kubernetes_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "CBLMariner", "Mariner", "Windows2019", and "Windows2022". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSSKU + :ivar vm_size: The size of the VM. + :vartype vm_size: str + :ivar enable_fips: Whether to use a FIPS-enabled OS. + :vartype enable_fips: bool + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "kubernetes_version": {"readonly": True}, + "node_image_version": {"readonly": True}, + "os_type": {"readonly": True}, + "os_sku": {"readonly": True}, + "vm_size": {"readonly": True}, + "enable_fips": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "creation_data": {"key": "properties.creationData", "type": "CreationData"}, + "snapshot_type": {"key": "properties.snapshotType", "type": "str"}, + "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, + "node_image_version": {"key": "properties.nodeImageVersion", "type": "str"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "os_sku": {"key": "properties.osSku", "type": "str"}, + "vm_size": {"key": "properties.vmSize", "type": "str"}, + "enable_fips": {"key": "properties.enableFIPS", "type": "bool"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + creation_data: Optional["_models.CreationData"] = None, + snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword creation_data: CreationData to be used to specify the source agent pool resource ID to + create this snapshot. + :paramtype creation_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreationData + :keyword snapshot_type: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". + :paramtype snapshot_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.SnapshotType + """ + super().__init__(tags=tags, location=location, **kwargs) + self.creation_data = creation_data + self.snapshot_type = snapshot_type + self.kubernetes_version = None + self.node_image_version = None + self.os_type = None + self.os_sku = None + self.vm_size = None + self.enable_fips = None + + +class SnapshotListResult(_serialization.Model): + """The response from the List Snapshots operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of snapshots. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot] + :ivar next_link: The URL to get the next set of snapshot results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[Snapshot]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of snapshots. + :paramtype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class SysctlConfig(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Sysctl settings for Linux agent nodes. + + :ivar net_core_somaxconn: Sysctl setting net.core.somaxconn. + :vartype net_core_somaxconn: int + :ivar net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :vartype net_core_netdev_max_backlog: int + :ivar net_core_rmem_default: Sysctl setting net.core.rmem_default. + :vartype net_core_rmem_default: int + :ivar net_core_rmem_max: Sysctl setting net.core.rmem_max. + :vartype net_core_rmem_max: int + :ivar net_core_wmem_default: Sysctl setting net.core.wmem_default. + :vartype net_core_wmem_default: int + :ivar net_core_wmem_max: Sysctl setting net.core.wmem_max. + :vartype net_core_wmem_max: int + :ivar net_core_optmem_max: Sysctl setting net.core.optmem_max. + :vartype net_core_optmem_max: int + :ivar net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :vartype net_ipv4_tcp_max_syn_backlog: int + :ivar net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :vartype net_ipv4_tcp_max_tw_buckets: int + :ivar net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :vartype net_ipv4_tcp_fin_timeout: int + :ivar net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :vartype net_ipv4_tcp_keepalive_time: int + :ivar net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :vartype net_ipv4_tcp_keepalive_probes: int + :ivar net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :vartype net_ipv4_tcpkeepalive_intvl: int + :ivar net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :vartype net_ipv4_tcp_tw_reuse: bool + :ivar net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :vartype net_ipv4_ip_local_port_range: str + :ivar net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :vartype net_ipv4_neigh_default_gc_thresh1: int + :ivar net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :vartype net_ipv4_neigh_default_gc_thresh2: int + :ivar net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :vartype net_ipv4_neigh_default_gc_thresh3: int + :ivar net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :vartype net_netfilter_nf_conntrack_max: int + :ivar net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :vartype net_netfilter_nf_conntrack_buckets: int + :ivar fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :vartype fs_inotify_max_user_watches: int + :ivar fs_file_max: Sysctl setting fs.file-max. + :vartype fs_file_max: int + :ivar fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :vartype fs_aio_max_nr: int + :ivar fs_nr_open: Sysctl setting fs.nr_open. + :vartype fs_nr_open: int + :ivar kernel_threads_max: Sysctl setting kernel.threads-max. + :vartype kernel_threads_max: int + :ivar vm_max_map_count: Sysctl setting vm.max_map_count. + :vartype vm_max_map_count: int + :ivar vm_swappiness: Sysctl setting vm.swappiness. + :vartype vm_swappiness: int + :ivar vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :vartype vm_vfs_cache_pressure: int + """ + + _attribute_map = { + "net_core_somaxconn": {"key": "netCoreSomaxconn", "type": "int"}, + "net_core_netdev_max_backlog": {"key": "netCoreNetdevMaxBacklog", "type": "int"}, + "net_core_rmem_default": {"key": "netCoreRmemDefault", "type": "int"}, + "net_core_rmem_max": {"key": "netCoreRmemMax", "type": "int"}, + "net_core_wmem_default": {"key": "netCoreWmemDefault", "type": "int"}, + "net_core_wmem_max": {"key": "netCoreWmemMax", "type": "int"}, + "net_core_optmem_max": {"key": "netCoreOptmemMax", "type": "int"}, + "net_ipv4_tcp_max_syn_backlog": {"key": "netIpv4TcpMaxSynBacklog", "type": "int"}, + "net_ipv4_tcp_max_tw_buckets": {"key": "netIpv4TcpMaxTwBuckets", "type": "int"}, + "net_ipv4_tcp_fin_timeout": {"key": "netIpv4TcpFinTimeout", "type": "int"}, + "net_ipv4_tcp_keepalive_time": {"key": "netIpv4TcpKeepaliveTime", "type": "int"}, + "net_ipv4_tcp_keepalive_probes": {"key": "netIpv4TcpKeepaliveProbes", "type": "int"}, + "net_ipv4_tcpkeepalive_intvl": {"key": "netIpv4TcpkeepaliveIntvl", "type": "int"}, + "net_ipv4_tcp_tw_reuse": {"key": "netIpv4TcpTwReuse", "type": "bool"}, + "net_ipv4_ip_local_port_range": {"key": "netIpv4IpLocalPortRange", "type": "str"}, + "net_ipv4_neigh_default_gc_thresh1": {"key": "netIpv4NeighDefaultGcThresh1", "type": "int"}, + "net_ipv4_neigh_default_gc_thresh2": {"key": "netIpv4NeighDefaultGcThresh2", "type": "int"}, + "net_ipv4_neigh_default_gc_thresh3": {"key": "netIpv4NeighDefaultGcThresh3", "type": "int"}, + "net_netfilter_nf_conntrack_max": {"key": "netNetfilterNfConntrackMax", "type": "int"}, + "net_netfilter_nf_conntrack_buckets": {"key": "netNetfilterNfConntrackBuckets", "type": "int"}, + "fs_inotify_max_user_watches": {"key": "fsInotifyMaxUserWatches", "type": "int"}, + "fs_file_max": {"key": "fsFileMax", "type": "int"}, + "fs_aio_max_nr": {"key": "fsAioMaxNr", "type": "int"}, + "fs_nr_open": {"key": "fsNrOpen", "type": "int"}, + "kernel_threads_max": {"key": "kernelThreadsMax", "type": "int"}, + "vm_max_map_count": {"key": "vmMaxMapCount", "type": "int"}, + "vm_swappiness": {"key": "vmSwappiness", "type": "int"}, + "vm_vfs_cache_pressure": {"key": "vmVfsCachePressure", "type": "int"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword net_core_somaxconn: Sysctl setting net.core.somaxconn. + :paramtype net_core_somaxconn: int + :keyword net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :paramtype net_core_netdev_max_backlog: int + :keyword net_core_rmem_default: Sysctl setting net.core.rmem_default. + :paramtype net_core_rmem_default: int + :keyword net_core_rmem_max: Sysctl setting net.core.rmem_max. + :paramtype net_core_rmem_max: int + :keyword net_core_wmem_default: Sysctl setting net.core.wmem_default. + :paramtype net_core_wmem_default: int + :keyword net_core_wmem_max: Sysctl setting net.core.wmem_max. + :paramtype net_core_wmem_max: int + :keyword net_core_optmem_max: Sysctl setting net.core.optmem_max. + :paramtype net_core_optmem_max: int + :keyword net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :paramtype net_ipv4_tcp_max_syn_backlog: int + :keyword net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :paramtype net_ipv4_tcp_max_tw_buckets: int + :keyword net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :paramtype net_ipv4_tcp_fin_timeout: int + :keyword net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :paramtype net_ipv4_tcp_keepalive_time: int + :keyword net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :paramtype net_ipv4_tcp_keepalive_probes: int + :keyword net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :paramtype net_ipv4_tcpkeepalive_intvl: int + :keyword net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :paramtype net_ipv4_tcp_tw_reuse: bool + :keyword net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :paramtype net_ipv4_ip_local_port_range: str + :keyword net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :paramtype net_ipv4_neigh_default_gc_thresh1: int + :keyword net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :paramtype net_ipv4_neigh_default_gc_thresh2: int + :keyword net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :paramtype net_ipv4_neigh_default_gc_thresh3: int + :keyword net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :paramtype net_netfilter_nf_conntrack_max: int + :keyword net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :paramtype net_netfilter_nf_conntrack_buckets: int + :keyword fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :paramtype fs_inotify_max_user_watches: int + :keyword fs_file_max: Sysctl setting fs.file-max. + :paramtype fs_file_max: int + :keyword fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :paramtype fs_aio_max_nr: int + :keyword fs_nr_open: Sysctl setting fs.nr_open. + :paramtype fs_nr_open: int + :keyword kernel_threads_max: Sysctl setting kernel.threads-max. + :paramtype kernel_threads_max: int + :keyword vm_max_map_count: Sysctl setting vm.max_map_count. + :paramtype vm_max_map_count: int + :keyword vm_swappiness: Sysctl setting vm.swappiness. + :paramtype vm_swappiness: int + :keyword vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :paramtype vm_vfs_cache_pressure: int + """ + super().__init__(**kwargs) + self.net_core_somaxconn = net_core_somaxconn + self.net_core_netdev_max_backlog = net_core_netdev_max_backlog + self.net_core_rmem_default = net_core_rmem_default + self.net_core_rmem_max = net_core_rmem_max + self.net_core_wmem_default = net_core_wmem_default + self.net_core_wmem_max = net_core_wmem_max + self.net_core_optmem_max = net_core_optmem_max + self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog + self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets + self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout + self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time + self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes + self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl + self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse + self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range + self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 + self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 + self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 + self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max + self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets + self.fs_inotify_max_user_watches = fs_inotify_max_user_watches + self.fs_file_max = fs_file_max + self.fs_aio_max_nr = fs_aio_max_nr + self.fs_nr_open = fs_nr_open + self.kernel_threads_max = kernel_threads_max + self.vm_max_map_count = vm_max_map_count + self.vm_swappiness = vm_swappiness + self.vm_vfs_cache_pressure = vm_vfs_cache_pressure + + +class SystemData(_serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :paramtype created_by_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", and "Key". + :paramtype last_modified_by_type: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super().__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TagsObject(_serialization.Model): + """Tags object for patch operations. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + } + + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + """ + super().__init__(**kwargs) + self.tags = tags + + +class TimeInWeek(_serialization.Model): + """Time in a week. + + :ivar day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", and "Saturday". + :vartype day: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeekDay + :ivar hour_slots: Each integer hour represents a time range beginning at 0m after the hour + ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 + UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + :vartype hour_slots: list[int] + """ + + _attribute_map = { + "day": {"key": "day", "type": "str"}, + "hour_slots": {"key": "hourSlots", "type": "[int]"}, + } + + def __init__( + self, + *, + day: Optional[Union[str, "_models.WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs: Any + ) -> None: + """ + :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", and "Saturday". + :paramtype day: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeekDay + :keyword hour_slots: Each integer hour represents a time range beginning at 0m after the hour + ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 + UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + :paramtype hour_slots: list[int] + """ + super().__init__(**kwargs) + self.day = day + self.hour_slots = hour_slots + + +class TimeSpan(_serialization.Model): + """For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + + :ivar start: The start of a time span. + :vartype start: ~datetime.datetime + :ivar end: The end of a time span. + :vartype end: ~datetime.datetime + """ + + _attribute_map = { + "start": {"key": "start", "type": "iso-8601"}, + "end": {"key": "end", "type": "iso-8601"}, + } + + def __init__( + self, *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: + """ + :keyword start: The start of a time span. + :paramtype start: ~datetime.datetime + :keyword end: The end of a time span. + :paramtype end: ~datetime.datetime + """ + super().__init__(**kwargs) + self.start = start + self.end = end + + +class TrustedAccessRole(_serialization.Model): + """Trusted access role definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source_resource_type: Resource type of Azure resource. + :vartype source_resource_type: str + :ivar name: Name of role, name is unique under a source resource type. + :vartype name: str + :ivar rules: List of rules for the role. This maps to 'rules' property of `Kubernetes Cluster + Role + `_. + :vartype rules: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleRule] + """ + + _validation = { + "source_resource_type": {"readonly": True}, + "name": {"readonly": True}, + "rules": {"readonly": True}, + } + + _attribute_map = { + "source_resource_type": {"key": "sourceResourceType", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "rules": {"key": "rules", "type": "[TrustedAccessRoleRule]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.source_resource_type = None + self.name = None + self.rules = None + + +class TrustedAccessRoleBinding(Resource): + """Defines binding between a resource and role. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.v2023_01_02_preview.models.SystemData + :ivar provisioning_state: The current provisioning state of trusted access role binding. Known + values are: "Canceled", "Deleting", "Failed", "Succeeded", and "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBindingProvisioningState + :ivar source_resource_id: The ARM resource ID of source resource that trusted access is + configured for. Required. + :vartype source_resource_id: str + :ivar roles: A list of roles to bind, each item is a resource type qualified role name. For + example: 'Microsoft.MachineLearningServices/workspaces/reader'. Required. + :vartype roles: list[str] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "source_resource_id": {"required": True}, + "roles": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "source_resource_id": {"key": "properties.sourceResourceId", "type": "str"}, + "roles": {"key": "properties.roles", "type": "[str]"}, + } + + def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) -> None: + """ + :keyword source_resource_id: The ARM resource ID of source resource that trusted access is + configured for. Required. + :paramtype source_resource_id: str + :keyword roles: A list of roles to bind, each item is a resource type qualified role name. For + example: 'Microsoft.MachineLearningServices/workspaces/reader'. Required. + :paramtype roles: list[str] + """ + super().__init__(**kwargs) + self.provisioning_state = None + self.source_resource_id = source_resource_id + self.roles = roles + + +class TrustedAccessRoleBindingListResult(_serialization.Model): + """List of trusted access role bindings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Role binding list. + :vartype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[TrustedAccessRoleBinding]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] = None, **kwargs: Any) -> None: + """ + :keyword value: Role binding list. + :paramtype value: + list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class TrustedAccessRoleListResult(_serialization.Model): + """List of trusted access roles. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Role list. + :vartype value: list[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRole] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + "value": {"readonly": True}, + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[TrustedAccessRole]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.value = None + self.next_link = None + + +class TrustedAccessRoleRule(_serialization.Model): + """Rule for trusted access role. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar verbs: List of allowed verbs. + :vartype verbs: list[str] + :ivar api_groups: List of allowed apiGroups. + :vartype api_groups: list[str] + :ivar resources: List of allowed resources. + :vartype resources: list[str] + :ivar resource_names: List of allowed names. + :vartype resource_names: list[str] + :ivar non_resource_ur_ls: List of allowed nonResourceURLs. + :vartype non_resource_ur_ls: list[str] + """ + + _validation = { + "verbs": {"readonly": True}, + "api_groups": {"readonly": True}, + "resources": {"readonly": True}, + "resource_names": {"readonly": True}, + "non_resource_ur_ls": {"readonly": True}, + } + + _attribute_map = { + "verbs": {"key": "verbs", "type": "[str]"}, + "api_groups": {"key": "apiGroups", "type": "[str]"}, + "resources": {"key": "resources", "type": "[str]"}, + "resource_names": {"key": "resourceNames", "type": "[str]"}, + "non_resource_ur_ls": {"key": "nonResourceURLs", "type": "[str]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.verbs = None + self.api_groups = None + self.resources = None + self.resource_names = None + self.non_resource_ur_ls = None + + +class UpgradeOverrideSettings(_serialization.Model): + """Settings for overrides when upgrading a cluster. + + :ivar control_plane_overrides: List of upgrade overrides when upgrading a cluster's control + plane. + :vartype control_plane_overrides: list[str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ControlPlaneUpgradeOverride] + :ivar until: Until when the overrides are effective. Note that this only matches the start time + of an upgrade, and the effectiveness won't change once an upgrade starts even if the ``until`` + expires as upgrade proceeds. This field is not set by default. It must be set for the overrides + to take effect. + :vartype until: ~datetime.datetime + """ + + _attribute_map = { + "control_plane_overrides": {"key": "controlPlaneOverrides", "type": "[str]"}, + "until": {"key": "until", "type": "iso-8601"}, + } + + def __init__( + self, + *, + control_plane_overrides: Optional[List[Union[str, "_models.ControlPlaneUpgradeOverride"]]] = None, + until: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword control_plane_overrides: List of upgrade overrides when upgrading a cluster's control + plane. + :paramtype control_plane_overrides: list[str or + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ControlPlaneUpgradeOverride] + :keyword until: Until when the overrides are effective. Note that this only matches the start + time of an upgrade, and the effectiveness won't change once an upgrade starts even if the + ``until`` expires as upgrade proceeds. This field is not set by default. It must be set for the + overrides to take effect. + :paramtype until: ~datetime.datetime + """ + super().__init__(**kwargs) + self.control_plane_overrides = control_plane_overrides + self.until = until + + +class WeeklySchedule(_serialization.Model): + """For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + + All required parameters must be populated in order to send to Azure. + + :ivar interval_weeks: Specifies the number of weeks between each set of occurrences. Required. + :vartype interval_weeks: int + :ivar day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known + values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". + :vartype day_of_week: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeekDay + """ + + _validation = { + "interval_weeks": {"required": True, "maximum": 4, "minimum": 1}, + "day_of_week": {"required": True}, + } + + _attribute_map = { + "interval_weeks": {"key": "intervalWeeks", "type": "int"}, + "day_of_week": {"key": "dayOfWeek", "type": "str"}, + } + + def __init__(self, *, interval_weeks: int, day_of_week: Union[str, "_models.WeekDay"], **kwargs: Any) -> None: + """ + :keyword interval_weeks: Specifies the number of weeks between each set of occurrences. + Required. + :paramtype interval_weeks: int + :keyword day_of_week: Specifies on which day of the week the maintenance occurs. Required. + Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and + "Saturday". + :paramtype day_of_week: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.WeekDay + """ + super().__init__(**kwargs) + self.interval_weeks = interval_weeks + self.day_of_week = day_of_week + + +class WindowsGmsaProfile(_serialization.Model): + """Windows gMSA Profile in the managed cluster. + + :ivar enabled: Specifies whether to enable Windows gMSA in the managed cluster. + :vartype enabled: bool + :ivar dns_server: Specifies the DNS server for Windows gMSA. :code:`
`:code:`
` Set it to + empty if you have configured the DNS server in the vnet which is used to create the managed + cluster. + :vartype dns_server: str + :ivar root_domain_name: Specifies the root domain name for Windows gMSA. + :code:`
`:code:`
` Set it to empty if you have configured the DNS server in the vnet + which is used to create the managed cluster. + :vartype root_domain_name: str + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "dns_server": {"key": "dnsServer", "type": "str"}, + "root_domain_name": {"key": "rootDomainName", "type": "str"}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + dns_server: Optional[str] = None, + root_domain_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: Specifies whether to enable Windows gMSA in the managed cluster. + :paramtype enabled: bool + :keyword dns_server: Specifies the DNS server for Windows gMSA. :code:`
`:code:`
` Set it + to empty if you have configured the DNS server in the vnet which is used to create the managed + cluster. + :paramtype dns_server: str + :keyword root_domain_name: Specifies the root domain name for Windows gMSA. + :code:`
`:code:`
` Set it to empty if you have configured the DNS server in the vnet + which is used to create the managed cluster. + :paramtype root_domain_name: str + """ + super().__init__(**kwargs) + self.enabled = enabled + self.dns_server = dns_server + self.root_domain_name = root_domain_name diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/models/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/__init__.py new file mode 100644 index 000000000000..2575b4af3658 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/__init__.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations +from ._snapshots_operations import SnapshotsOperations +from ._managed_cluster_snapshots_operations import ManagedClusterSnapshotsOperations +from ._trusted_access_roles_operations import TrustedAccessRolesOperations +from ._trusted_access_role_bindings_operations import TrustedAccessRoleBindingsOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "ManagedClustersOperations", + "MaintenanceConfigurationsOperations", + "AgentPoolsOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", + "ResolvePrivateLinkServiceIdOperations", + "SnapshotsOperations", + "ManagedClusterSnapshotsOperations", + "TrustedAccessRolesOperations", + "TrustedAccessRoleBindingsOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_agent_pools_operations.py new file mode 100644 index 000000000000..a918a9308391 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_agent_pools_operations.py @@ -0,0 +1,1394 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_abort_latest_operation_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + subscription_id: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if ignore_pod_disruption_budget is not None: + _params["ignore-pod-disruption-budget"] = _SERIALIZER.query( + "ignore_pod_disruption_budget", ignore_pod_disruption_budget, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_upgrade_profile_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_available_agent_pool_versions_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_upgrade_node_image_version_request( + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "agentPoolName": _SERIALIZER.url( + "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class AgentPoolsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`agent_pools` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace + def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Aborts last operation running on agent pool. + + Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a + Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + completes before cancellation can take place, an error is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + } + + @distributed_trace + def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterable["_models.AgentPool"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPool or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPoolListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AgentPoolListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools" + } + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPool: + """Gets the specified managed cluster agent pool. + + Gets the specified managed cluster agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> _models.AgentPool: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "AgentPool") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _models.AgentPool, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, IO], + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes an agent pool in the specified managed cluster. + + Deletes an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods on + a node without considering Pod Disruption Budget. Default value is None. + :type ignore_pod_disruption_budget: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + } + + @distributed_trace + def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPoolUpgradeProfile: + """Gets the upgrade profile for an agent pool. + + Gets the upgrade profile for an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default" + } + + @distributed_trace + def get_available_agent_pool_versions( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.AgentPoolAvailableVersions: + """Gets a list of supported Kubernetes versions for the specified agent pool. + + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPoolAvailableVersions + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) + + request = build_get_available_agent_pool_versions_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_available_agent_pool_versions.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AgentPoolAvailableVersions", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_available_agent_pool_versions.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions" + } + + def _upgrade_node_image_version_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Optional[_models.AgentPool]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[Optional[_models.AgentPool]] = kwargs.pop("cls", None) + + request = build_upgrade_node_image_version_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._upgrade_node_image_version_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _upgrade_node_image_version_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } + + @distributed_trace + def begin_upgrade_node_image_version( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Upgrades the node image version of an agent pool to the latest. + + Upgrading the node image version of an agent pool applies the newest OS and runtime updates to + the nodes. AKS provides one new image per week with the latest updates. For more details on + node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("AgentPool", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_upgrade_node_image_version.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_maintenance_configurations_operations.py new file mode 100644 index 000000000000..42d2e5e4de17 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_maintenance_configurations_operations.py @@ -0,0 +1,628 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_managed_cluster_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, resource_name: str, config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "configName": _SERIALIZER.url("config_name", config_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "configName": _SERIALIZER.url("config_name", config_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, resource_name: str, config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "configName": _SERIALIZER.url("config_name", config_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class MaintenanceConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterable["_models.MaintenanceConfiguration"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfiguration or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.MaintenanceConfigurationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_managed_cluster.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("MaintenanceConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_managed_cluster.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations" + } + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Gets the specified maintenance configuration of a managed cluster. + + Gets the specified maintenance configuration of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: _models.MaintenanceConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, IO], + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "MaintenanceConfiguration") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("MaintenanceConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes a maintenance configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Required. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_cluster_snapshots_operations.py new file mode 100644 index 000000000000..65a1a2a6ff95 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -0,0 +1,903 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_update_tags_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class ManagedClusterSnapshotsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`managed_cluster_snapshots` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.ManagedClusterSnapshot"]: + """Gets a list of managed cluster snapshots in the specified subscription. + + Gets a list of managed cluster snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterSnapshot or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" + } + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> Iterable["_models.ManagedClusterSnapshot"]: + """Lists managed cluster snapshots in the specified subscription and resource group. + + Lists managed cluster snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterSnapshot or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots" + } + + @distributed_trace + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: + """Gets a managed cluster snapshot. + + Gets a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterSnapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterSnapshot, IO], + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterSnapshot") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Is either a TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterSnapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update_tags.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """Deletes a managed cluster snapshot. + + Deletes a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_clusters_operations.py new file mode 100644 index 000000000000..221d438ba074 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_managed_clusters_operations.py @@ -0,0 +1,3774 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_get_os_options_request( + location: str, subscription_id: str, *, resource_type: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if resource_type is not None: + _params["resource-type"] = _SERIALIZER.query("resource_type", resource_type, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_upgrade_profile_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_access_profile_request( + resource_group_name: str, resource_name: str, role_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_cluster_admin_credentials_request( + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + server_fqdn: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if server_fqdn is not None: + _params["server-fqdn"] = _SERIALIZER.query("server_fqdn", server_fqdn, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_cluster_user_credentials_request( + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + server_fqdn: Optional[str] = None, + format: Optional[Union[str, _models.Format]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if server_fqdn is not None: + _params["server-fqdn"] = _SERIALIZER.query("server_fqdn", server_fqdn, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_cluster_monitoring_user_credentials_request( + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + server_fqdn: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if server_fqdn is not None: + _params["server-fqdn"] = _SERIALIZER.query("server_fqdn", server_fqdn, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_update_tags_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if ignore_pod_disruption_budget is not None: + _params["ignore-pod-disruption-budget"] = _SERIALIZER.query( + "ignore_pod_disruption_budget", ignore_pod_disruption_budget, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reset_service_principal_profile_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reset_aad_profile_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_abort_latest_operation_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rotate_cluster_certificates_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rotate_service_account_signing_keys_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_stop_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_start_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_run_command_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_command_result_request( + resource_group_name: str, resource_name: str, command_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "commandId": _SERIALIZER.url("command_id", command_id, "str"), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_outbound_network_dependencies_endpoints_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class ManagedClustersOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`managed_clusters` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_os_options( + self, location: str, resource_type: Optional[str] = None, **kwargs: Any + ) -> _models.OSOptionProfile: + """Gets supported OS options in the specified subscription. + + Gets supported OS options in the specified subscription. + + :param location: The name of Azure region. Required. + :type location: str + :param resource_type: The resource type for which the OS options needs to be returned. Default + value is None. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.OSOptionProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.OSOptionProfile] = kwargs.pop("cls", None) + + request = build_get_os_options_request( + location=location, + subscription_id=self._config.subscription_id, + resource_type=resource_type, + api_version=api_version, + template_url=self.get_os_options.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("OSOptionProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_os_options.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + } + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.ManagedCluster"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters"} + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.ManagedCluster"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedCluster or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ManagedClusterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters" + } + + @distributed_trace + def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.ManagedClusterUpgradeProfile: + """Gets the upgrade profile of a managed cluster. + + Gets the upgrade profile of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + + request = build_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_upgrade_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterUpgradeProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default" + } + + @distributed_trace + def get_access_profile( + self, resource_group_name: str, resource_name: str, role_name: str, **kwargs: Any + ) -> _models.ManagedClusterAccessProfile: + """Gets an access profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Instead use `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. Required. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAccessProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) + + request = build_get_access_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + role_name=role_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_access_profile.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedClusterAccessProfile", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_access_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential" + } + + @distributed_trace + def list_cluster_admin_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the admin credentials of a managed cluster. + + Lists the admin credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_admin_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_admin_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_admin_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential" + } + + @distributed_trace + def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + format: Optional[Union[str, _models.Format]] = None, + **kwargs: Any + ) -> _models.CredentialResults: + """Lists the user credentials of a managed cluster. + + Lists the user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :param format: Only apply to AAD clusters, specifies the format of returned kubeconfig. Format + 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format + kubeconfig, which requires kubelogin binary in the path. Known values are: "azure" and "exec". + Default value is None. + :type format: str or ~azure.mgmt.containerservice.v2023_01_02_preview.models.Format + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + format=format, + api_version=api_version, + template_url=self.list_cluster_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential" + } + + @distributed_trace + def list_cluster_monitoring_user_credentials( + self, resource_group_name: str, resource_name: str, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the cluster monitoring user credentials of a managed cluster. + + Lists the cluster monitoring user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + request = build_list_cluster_monitoring_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=api_version, + template_url=self.list_cluster_monitoring_user_credentials.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_cluster_monitoring_user_credentials.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential" + } + + @distributed_trace + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: + """Gets a managed cluster. + + Gets a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _create_or_update_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedCluster") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedCluster, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.ManagedCluster, IO], **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _update_tags_initial( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.ManagedCluster: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_tags_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ManagedCluster", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either + a TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ManagedCluster", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + ignore_pod_disruption_budget: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a managed cluster. + + Deletes a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods on + a node without considering Pod Disruption Budget. Default value is None. + :type ignore_pod_disruption_budget: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" + } + + def _reset_service_principal_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterServicePrincipalProfile") + + request = build_reset_service_principal_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_service_principal_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_service_principal_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + @overload + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterServicePrincipalProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterServicePrincipalProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, IO], + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Is either a + ManagedClusterServicePrincipalProfile type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterServicePrincipalProfile + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_service_principal_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" + } + + def _reset_aad_profile_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ManagedClusterAADProfile") + + request = build_reset_aad_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._reset_aad_profile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reset_aad_profile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + @overload + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterAADProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAADProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, IO], + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.ManagedClusterAADProfile or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reset_aad_profile_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reset_aad_profile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" + } + + def _abort_latest_operation_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._abort_latest_operation_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _abort_latest_operation_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + @distributed_trace + def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Aborts last operation running on managed cluster. + + Aborts the currently running operation on the managed cluster. The Managed Cluster will be + moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If + the operation completes before cancellation can take place, an error is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._abort_latest_operation_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_abort_latest_operation.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + } + + def _rotate_cluster_certificates_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_cluster_certificates_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_cluster_certificates_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_cluster_certificates_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + @distributed_trace + def begin_rotate_cluster_certificates( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Rotates the certificates of a managed cluster. + + See `Certificate rotation `_ for + more details about rotating managed cluster certificates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rotate_cluster_certificates_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_cluster_certificates.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" + } + + def _rotate_service_account_signing_keys_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_rotate_service_account_signing_keys_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._rotate_service_account_signing_keys_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _rotate_service_account_signing_keys_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + @distributed_trace + def begin_rotate_service_account_signing_keys( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Rotates the service account signing keys of a managed cluster. + + Rotates the service account signing keys of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rotate_service_account_signing_keys_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_rotate_service_account_signing_keys.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + } + + def _stop_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_stop_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _stop_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + @distributed_trace + def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: + """Stops a Managed Cluster. + + This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a + cluster stops the control plane and agent nodes entirely, while maintaining all object and + cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster + `_ for more details about stopping a + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._stop_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_stop.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" + } + + def _start_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_start_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _start_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + @distributed_trace + def begin_start(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: + """Starts a previously stopped Managed Cluster. + + See `starting a cluster `_ for more + details about starting a cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._start_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_start.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" + } + + def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(request_payload, (IO, bytes)): + _content = request_payload + else: + _json = self._serialize.body(request_payload, "RunCommandRequest") + + request = build_run_command_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._run_command_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _run_command_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @overload + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: _models.RunCommandRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, IO], + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Is either a RunCommandRequest type or a IO + type. Required. + :type request_payload: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("RunCommandResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_run_command.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + } + + @distributed_trace + def get_command_result( + self, resource_group_name: str, resource_name: str, command_id: str, **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + """Gets the results of a command which has been run on the Managed Cluster. + + Gets the results of a command which has been run on the Managed Cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param command_id: Id of the command. Required. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult or None or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.RunCommandResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + request = build_get_command_result_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + command_id=command_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_command_result.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("RunCommandResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + get_command_result.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}" + } + + @distributed_trace + def list_outbound_network_dependencies_endpoints( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterable["_models.OutboundEnvironmentEndpoint"]: + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. + + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpoint or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.OutboundEnvironmentEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.OutboundEnvironmentEndpointCollection] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_outbound_network_dependencies_endpoints.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OutboundEnvironmentEndpointCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_outbound_network_dependencies_endpoints.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_operations.py new file mode 100644 index 000000000000..35bc83273f95 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_operations.py @@ -0,0 +1,165 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.ContainerService/operations") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.OperationValue"]: + """Gets a list of operations. + + Gets a list of operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationValue or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.OperationValue] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.ContainerService/operations"} diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..255b50dcdf92 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,676 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request( + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnectionListResult: + """Gets a list of private endpoint connections in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnectionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections" + } + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the specified private endpoint connection. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, IO], + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO type. Required. + :type parameters: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateEndpointConnection") + + request = build_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } + + @distributed_trace + def begin_delete( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a private endpoint connection. + + Deletes a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..a0e741a711c0 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_private_link_resources_operations.py @@ -0,0 +1,169 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`private_link_resources` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResourcesListResult: + """Gets a list of private link resources in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResourcesListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.PrivateLinkResourcesListResult] = kwargs.pop("cls", None) + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResourcesListResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 000000000000..55624232257f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,254 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_post_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ResolvePrivateLinkServiceIdOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`resolve_private_link_service_id` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def post( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.PrivateLinkResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def post( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def post( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.PrivateLinkResource, IO], + **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. Is either + a PrivateLinkResource type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateLinkResource") + + request = build_post_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + post.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_snapshots_operations.py new file mode 100644 index 000000000000..afcb482efa70 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_snapshots_operations.py @@ -0,0 +1,887 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_update_tags_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class SnapshotsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`snapshots` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. + + Gets a list of snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots"} + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Snapshot"]: + """Lists snapshots in the specified subscription and resource group. + + Lists snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Snapshot or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SnapshotListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots" + } + + @distributed_trace + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: + """Gets a snapshot. + + Gets a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.Snapshot, IO], **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO type. + Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Snapshot") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update_tags( + self, resource_group_name: str, resource_name: str, parameters: Union[_models.TagsObject, IO], **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO type. Required. + :type parameters: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TagsObject or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "TagsObject") + + request = build_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.update_tags.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Snapshot", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """Deletes a snapshot. + + Deletes a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_role_bindings_operations.py new file mode 100644 index 000000000000..5dd2a449d7e0 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -0,0 +1,661 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", + trusted_access_role_binding_name, + "str", + max_length=24, + min_length=1, + pattern=r"^([A-Za-z0-9-])+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", + trusted_access_role_binding_name, + "str", + max_length=24, + min_length=1, + pattern=r"^([A-Za-z0-9-])+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # 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, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceName": _SERIALIZER.url( + "resource_name", + resource_name, + "str", + max_length=63, + min_length=1, + pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", + ), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", + trusted_access_role_binding_name, + "str", + max_length=24, + min_length=1, + pattern=r"^([A-Za-z0-9-])+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class TrustedAccessRoleBindingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`trusted_access_role_bindings` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterable["_models.TrustedAccessRoleBinding"]: + """List trusted access role bindings. + + List trusted access role bindings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TrustedAccessRoleBinding or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.TrustedAccessRoleBindingListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("TrustedAccessRoleBindingListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" + } + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Get a trusted access role binding. + + Get a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("TrustedAccessRoleBinding", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + } + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _models.TrustedAccessRoleBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Create or update a trusted access role binding. + + Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Create or update a trusted access role binding. + + Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, IO], + **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Create or update a trusted access role binding. + + Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO type. Required. + :type trusted_access_role_binding: + ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TrustedAccessRoleBinding or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(trusted_access_role_binding, (IO, bytes)): + _content = trusted_access_role_binding + else: + _json = self._serialize.body(trusted_access_role_binding, "TrustedAccessRoleBinding") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_or_update.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("TrustedAccessRoleBinding", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + } + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> None: + """Delete a trusted access role binding. + + Delete a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.delete.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_roles_operations.py new file mode 100644 index 000000000000..13273c179ef5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/operations/_trusted_access_roles_operations.py @@ -0,0 +1,180 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class TrustedAccessRolesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2023_01_02_preview.ContainerServiceClient`'s + :attr:`trusted_access_roles` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, location: str, **kwargs: Any) -> Iterable["_models.TrustedAccessRole"]: + """List supported trusted access roles. + + List supported trusted access roles. + + :param location: The name of Azure region. Required. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TrustedAccessRole or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2023_01_02_preview.models.TrustedAccessRole] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2023-01-02-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-01-02-preview") + ) + cls: ClsType[_models.TrustedAccessRoleListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("TrustedAccessRoleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" + } diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/py.typed b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2023_01_02_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file